Red Agent Chains SSRF and URL-Validation Bypass to Read GCP Cloud Run Files

Summary
Wiz describes how its Red Agent bypassed a GitHub URL validator in a GCP Cloud Run service to read local files, exposing service-account credentials and application source code.
Key points
- The Cloud Run endpoint accepted a user-controlled URL but attempted to restrict requests to GitHub blob URLs.
- After failed traversal and URL-confusion attempts, the agent used a double slash followed by an absolute path to bypass validation.
- The flaw enabled unauthenticated reads of /proc/self/environ and application files, including source code.
- The exposed environment contained GCP service-account credentials and API keys; Wiz says the credentials worked against live GCP APIs.
- Wiz reports that the agent reached the exploit through 96 probing requests that built on earlier failures.
Article Details
- Attack Vectors
- An unauthenticated SSRF in a GCP Cloud Run service accepted a URL parameter restricted to GitHub blob URL structure.
- Appending // and an absolute filesystem path after a valid-looking GitHub URL bypassed the validator and enabled local file reads.
- The file-read primitive exposed service-account credentials and API keys from /proc/self/environ, as well as application source code and bundle metadata.
