Skip to content
Access control Write-up Advanced

Gatewaytoheaven Gcp Cross Tenant Vulnerability

A cross-tenant vulnerability in Google Cloud's Apigee allowed an attacker to access analytics data and logs from all Apigee tenants, including plaintext access tokens that could be used to impersonate any end user. The attacker could also write to these cross-tenant buckets, potentially affecting other tenants' data.

omeramiad.com

Published on omeramiad.com

A few months ago, I discovered GatewayToHeaven, a vulnerability in Google Cloud’s Apigee that allowed for reading and writing verbose cross-tenant access logs and analytics data. Some of the data contained plaintext access tokens, which could be exfiltrated to potentially impersonate any end user of any organization…

Omer Amiad, on omeramiad.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a misconfiguration in Apigee's tenant project allowed the Apigee service account to access a shared metadata bucket and Dataflow staging bucket, which in turn gave the Dataflow service account cross-tenant access to analytics data.

Impact

An attacker could read analytics data and logs from all Apigee tenants, including plaintext access tokens that could be used to impersonate any end user, and could also write to these cross-tenant buckets, potentially affecting other tenants' data.

What the attacker needed

Apigee enabled in a GCP project; ability to configure Apigee proxy policies; ability to send requests to Apigee; ability to write to PubSub topic

The fix

Google fixed the vulnerability, as indicated by the CVE assignment and the reward.

How it was found

  1. Configure Apigee to use the metadata endpoint as a backend and remove the X-Forwarded-For header to bypass SSRF protection.
  2. Retrieve the Apigee service account token from the metadata endpoint.
  3. Use the token to enumerate permissions and dump disks in the tenant project.
  4. Identify the Dataflow staging bucket and patch a JAR file with malicious code.
  5. Upload the patched JAR to the staging bucket and spam the PubSub topic to trigger autoscaling and execution of the malicious JAR.
  6. The malicious JAR fetches the Dataflow service account token and uploads it to an attacker-controlled GCS bucket.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Apigee is a service that helps manage APIs. Each customer gets their own isolated environment, but a flaw allowed one customer to reach into the shared storage used by all customers. This meant they could see other companies' API traffic, including secret tokens that could let them pretend to be other users.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.