Skip to main content
Back
DemonstrationGoogle Cloud
2 min read

ConfusedFunction exposes excessive Google Cloud build permissions

Environment
Tenable’s Google Cloud research project
When
Demonstration date unreportedDisclosed Jul 24, 2024
Entry
Tenable confirmed that an authorized function deployment ran a managed build in the project.

In research it called ConfusedFunction, Tenable showed that a developer authorized to deploy a Google Cloud Function could reach storage and build artifacts beyond their own permissions. The deployment ran under a legacy Cloud Build account that held those permissions in the test project. Google changed its build defaults in 2024, but existing projects could retain the legacy account.

What the demonstration did

Research team
Tenable
Internet
Cloud Functions
Cloud build account

Replaying the Cloud Functions demonstration

  1. 1

    Function deployment

    Research date unreported

    Tenable confirmed that an authorized function deployment ran a managed build in the project.

  2. 2

    Build permissions

    Research date unreported

    The researchers confirmed access under the legacy Cloud Build account and identified its broader project privileges.

Impact

Tenable confirmed access as the legacy Cloud Build service account in its research project. That account had storage and artifact permissions beyond the function deployer’s own role.

Would the controls have stopped it?

Give function builds a dedicated, narrowly scoped identity

Select a build service account that can read the required source and write the intended artifact. Restrict which build identities deployers can select or modify. These permissions limit what a build can reach while preserving legitimate deployments. Review existing projects because a change in provider defaults does not remove old grants.

Incident control assessments

0
Prevented
1
Contained
1
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

Research team
Tenable
Internet
Cloud Functions
Cloud build account

Replaying the Cloud Functions demonstration

1 · Function deployment

1 Not covered

2 · Build permissions

1 Contained

Key facts

  • Tenable tested with a principal that could deploy a Cloud Function.
  • Google’s managed deployment built the function using a separate service account.
  • The legacy build account had broader permissions than the function deployer, including storage and artifact access.
  • Google changed Cloud Build defaults during May and June 2024. Existing projects could retain the legacy account.

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    ConfusedFunction: A Privilege Escalation Vulnerability Impacting GCP Cloud FunctionsTenable Research · Jul 24, 2024 · ResearchFirsthand account of the test environment, observations and disclosure.
  2. 2.
    Build process overviewGoogle Cloud · undated · Vendor reportProvider documentation for the scope and limits of Build process overview.
  3. 3.
    Run builds with a user-managed service accountGoogle Cloud · undated · Vendor reportProvider documentation for the scope and limits of Run builds with a user-managed service account.

The estate in the replay follows the researchers' description of their own test environment. Verdicts describe what a control does when it is in place before the run. They are not an assessment of any company's security program.

More cloud attack breakdowns

All breakdowns