Skip to main content
Back
DemonstrationGoogle Cloud
5 min read

Tenable Research's ConfusedComposer escalation on Google Cloud Composer

Environment
A Cloud Composer 2 environment in a Google Cloud project Tenable Research used for the research; the sources name no affected customer
When
Not stated; reported to Google on October 19, 2024 – Apr 17, 2025Disclosed Feb 18, 2025
Entry
An identity holding composer.environments.update on a Cloud Composer 2 environment, with no direct access to the Composer or the Cloud Build service account.

Tenable Research showed that an identity holding only composer.environments.update could add a custom PyPI package to a Cloud Composer 2 environment, and Composer then installed it in a Cloud Build instance that ran as the project's default Cloud Build service account. The package's install script read that account's token from the metadata server and sent it out of the build; Tenable assessed project ownership as within reach and showed no action with the token. Google changed Composer 2 to run PyPI installs as the environment's service account, in every Composer 2 environment from April 17, 2025.

What the demonstration did

Outside parties
Tenable Research
Receiving host
Internet
Metadata serverCloud Build instance
Cloud Composer environment
Cloud Build instance in the project
+ Cloud Build
+ Cloud Storage
+ Artifact Registry
Project resources
Environment-updating identity
PyPI package configuration
Composer service account
pip install build
Default Cloud Build account

Replaying Tenable's ConfusedComposer demonstration / reported to Google in October 2024; the run date is not stated

  1. 1

    A package update

    Not dated · before October 19, 2024

    An identity holding only composer.environments.update adds a malicious custom PyPI package to the environment, and Composer starts a build to install it.

  2. 2

    The build runs as another identity

    Not dated · before October 19, 2024

    Composer provisions a Cloud Build instance in the project that runs as the default Cloud Build service account, and pip runs the package's installation script inside it.

  3. 3

    Token theft

    Not dated · before October 19, 2024

    The installation script reads the default Cloud Build service account's token from the metadata server of the build and sends it out.

  4. 4

    Reach of the stolen token

    Not dated · before October 19, 2024

    Tenable assesses project ownership as within reach of the token through the account's access to Cloud Build, Cloud Storage and Artifact Registry; no action with the token is shown.

Impact

In Tenable's research, a custom PyPI package ran code as the default Cloud Build service account and its token was taken out of the build; project ownership was assessed as within reach, and no action with the token is shown.

Outcome

What ConfusedComposer shows about your build identities

One permission to update a Composer environment was enough, because Composer 2 ran the package install as the project's default Cloud Build service account. On your Google Cloud projects, an IAM deny policy on environment updates bounds who can start that install, and the cloudbuild.disableCreateDefaultServiceAccount constraint keeps the legacy account out of projects created after you enforce it. No Google Cloud setting keeps code in the build from reading the account's token. A VPC Service Controls perimeter refuses the token used from outside it, and an IAM deny policy on the account refuses IAM changes; each bounds the token and neither stops the theft. Since April 17, 2025, Google runs PyPI installs in every Composer 2 environment as the environment's service account, and Composer 3 was not affected.

Would the controls have stopped it?

In hindsight, no control would have stopped it. 4 controls would have limited how far it went. 1 step has no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.

0
Prevented
4
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.

Outside parties
Tenable Research
Receiving host
Internet
Metadata serverCloud Build instance
Cloud Composer environment
Cloud Build instance in the project
+ Cloud Build
+ Cloud Storage
+ Artifact Registry
Project resources
Environment-updating identity
PyPI package configuration
Composer service account
pip install build
Default Cloud Build account

Replaying Tenable's ConfusedComposer demonstration / reported to Google in October 2024; the run date is not stated

1 · A package update

1 Contained

2 · The build runs as another identity

1 Contained

3 · Token theft

1 Not covered3 on other clouds

4 · Reach of the stolen token

2 Contained3 on other clouds

Key facts

  • An identity with only composer.environments.update added a custom PyPI package to a Cloud Composer 2 environment through an environment update, and Composer started a build to install it
  • The build ran in the project as the default Cloud Build service account, and pip ran the package's installation script inside it; the updating identity needed no grant on that account
  • The script read the account's token from the metadata server of the build and sent it out; the sources do not say where it went
  • Tenable assessed project ownership as "well within reach" through the account's access to Cloud Build, Cloud Storage and Artifact Registry, listed no roles of the account and showed no action with the token
  • Tenable reported the finding to Google on October 19, 2024 and published advisory TRA-2025-03, rated Medium, on February 18, 2025; no first-hand source says whether the issue was exploited before the fix
  • Google made new Composer 2 environments in 2.10.2 and later run PyPI installs as the environment's service account from January 10, 2025, and all Composer 2 environments from April 17, 2025, rolled out gradually by region; Composer 3 was not affected

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.
    ConfusedComposer: A Privilege Escalation Vulnerability Impacting GCP ComposerTenable Research · Apr 22, 2025 · ResearchAttack steps, required permission, build service account, token theft, impact as assessed, fix
  2. 2.
    Google Cloud Platform (GCP) Privilege Escalation Vulnerability in GCP ComposerTenable Research · Feb 18, 2025 · AdvisoryDisclosure timeline, attack steps, fix description, fix dates, risk rating
  3. 3.
    Cloud Composer release notesGoogle Cloud · undated · Vendor reportOld behavior, fix for new environments, fix for existing environments, affected versions, Composer 3 not affected
  4. 4.
  5. 5.
    Google Cloud Composer FlawGBHackers · Apr 23, 2025 · NewsExploitation statement and fix dates as reported, without a first-hand source

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