Critical Google Cloud Run Flaw Fixed: How Attackers Could Steal Private Images Through IAM Weakness


# Critical Vulnerability in Google Cloud Run Could Allow Code Injection

Security researchers at Tenable have uncovered a significant privilege escalation vulnerability in Google Cloud Platform’s Cloud Run service, dubbed “ImageRunner.” The flaw, now patched, could have enabled attackers to access private container images and potentially inject malicious code.

## The Vulnerability Explained

The issue affected Google Cloud Run, a fully managed serverless platform for containerized applications. Researchers discovered that certain identities with edit permissions on Cloud Run revisions, but without container registry permissions, could exploit this vulnerability.

When Cloud Run deploys a service, it retrieves container images from Artifact Registry or Docker Hub using a service agent account. The vulnerability allowed attackers with specific permissions (`run.services.update` and `iam.serviceAccounts.actAs`) to modify a Cloud Run service and deploy a new revision specifying any private container image within the same project.

This access could enable attackers to:
– View sensitive proprietary images in the victim’s registries
– Insert malicious code that could extract secrets
– Exfiltrate sensitive data
– Potentially establish reverse shells to attacker-controlled machines

## Google’s Response

Google patched the vulnerability on January 28, 2025. The fix ensures that any user or service account creating or updating a Cloud Run resource must have explicit permission to access the container images.

According to Google’s release notes: “When using Artifact Registry, ensure the principal has the Artifact Registry Reader (roles/artifactregistry.reader) IAM role on the project or repository containing the container image(s) to deploy.”

## Broader Implications

Tenable classifies ImageRunner as an example of “Jenga” vulnerabilities, which occur due to the interconnected nature of cloud services. As cloud providers build services atop existing ones, security risks cascade through the infrastructure, creating new attack vectors that can be difficult to detect.

This discovery follows recent findings from Praetorian about similar privilege escalation paths in Azure virtual machines that could potentially lead to subscription-level control.

Share This Article