Google Patches CVSS 10.0 RCE in Gemini CLI Headless Mode
Supply Chain Risk · 4 sources · Updated 5mo ago · First seen May 1, 2026

Google has patched a maximum-severity remote code execution flaw in Gemini CLI that affected headless deployments, especially GitHub Actions and other CI/CD workflows. The vulnerability stemmed from overly permissive workspace trust handling that automatically treated active folders as trusted and could load attacker-controlled configuration files and environment variables from local .gemini directories. The issue was independently discovered by Elad Meged of Novee and Dan Lisichkin of Pillar Security, and researchers warned that successful exploitation could expose secrets, credentials, source code, and connected downstream systems.
Google said the issue is addressed in Gemini CLI versions 0.39.1 and 0.40.0-preview.3, but warned that applying the fix may require additional workflow changes to avoid breaking automation. The run-gemini-cli GitHub Action defaults to the latest release, which can disrupt pipelines that depended on the previous implicit trust behavior, while workflows using --yolo mode may fail silently unless tool allowlists are updated to align with the new policy engine. Google is urging organizations to review CI/CD jobs and move to explicit trust settings and compatible allowlists before resuming automated use.
Why it matters
Impact assessment
This vulnerability affects organizations using Gemini CLI in headless mode, especially GitHub Actions and other CI/CD workflows that process untrusted content such as pull requests or public issues. Impact is severe because successful exploitation can enable host-level remote code execution, theft of CI secrets and credentials, source code exposure, build artifact tampering, and downstream supply-chain compromise.
Exposure is concentrated in automated development pipelines rather than general end users, but the affected use case is common in modern software engineering environments. The reporting describes proof-of-concept exploitation and full attack-chain demonstrations by researchers; the provided references do not confirm active in-the-wild abuse.
Supporting facts
- Affected products:
- @google/gemini-cli before 0.39.1 and 0.40.0-preview.3
- google-github-actions/run-gemini-cli before 0.1.22
- Most exposed environments:
- GitHub Actions
- Headless Gemini CLI deployments
- CI/CD workflows handling untrusted pull requests, issues, or repository content
- Business impact described:
- Secret and credential theft from CI pipelines
- Source code exposure
- Build artifact modification
- Repository takeover risk
- Supply-chain compromise and pivoting to downstream systems
- Severity:
- CVE-2026-12537
- CVSS 10.0 / maximum severity
- Exploitation status:
- Researchers from Novee and Pillar Security independently discovered the issue
- Pillar Security demonstrated a full attack chain against gemini-cli
- No confirmed in-the-wild exploitation stated in the references


