CVE-2026-12537
Gemini CLI: Remote Code Execution via workspace trust and tool allowlisting bypasses
Published Apr 24, 2026 · corrected/updated Sep 25, 2026 · evidence confidence high
# Summary Gemini CLI ( ) and the GitHub Action are being updated to harden workspace trust and tool allowlisting, in particular when used in untrusted environments like GitHub Actions. This update introduces a breaking change to how non-interactive (headless) environments handle folder trust, which may impact existing CI/CD workflows under specific conditions. # Details Folder Trust in Headless Mode In previous versions, Gemini CLI running in CI environments (headless mode) automatically trusted workspace folders for the purpose of loading configuration and environment variables. This is potentially risky in situations where Gemini CLI runs on untrusted folders in headless mode (e.g. CI workflows that review user-submitted pull requests). If used with untrusted directory contents, this could lead to remote code execution via malicious environment variables in the local directory. To ensure consistency and user control, the latest update aligns headless mode behavior with interactive mode, requiring folders to be explicitly trusted before configuration files (such as ) are processed. As a result of this change, GitHub Actions and other automated pipelines that rely on the previous automatic trust behavior will fail to load workspace-specific settings until they are updated to use explicit trust mechanisms. Tool Allowlisting under \--yolo In previous versions, when Gemini CLI was configured to run in mode, it would ignore any fine grained tool allowlist in (e.g. would allow any command). This is potentially risky in situations where Gemini CLI runs on untrusted inputs with (e.g. CI workflows that triage user-submitted GitHub issues where we recommend a strict allowlist). If used with untrusted content and a tool allowlist that permits , this could lead to remote code execution via prompt injection. In version , the Gemini CLI policy engine now evaluates tool allowlisting under mode, which is useful for CI workflows that allowlist a few safe commands to run when proces
Grounded briefings
Catalog interpretations for three audiences. Each brief cites ingested metadata and the original advisories below. They are not independent research and they do not invent exploit steps.
Executive
CVE-2026-12537 is a critical public vulnerability record for this product. It is not currently listed in the CISA Known Exploited catalog. Check the linked vendor or CERT advisories for patch status. This summary is a catalog interpretation of the ingested metadata and cites the original advisories below.
System administrator
Identify whether this product is in your estate, then compare installed versions with the affected ranges. Affected packages or ranges on record: google-github-actions/run-gemini-cli (0 → 0.1.22); @google/gemini-cli (0 → 0.39.1); @google/gemini-cli (0.40.0-preview.2 → 0.40.0-preview.3). Check the linked vendor or CERT advisories for patch status. Prefer the vendor or distribution advisory linked in Sources before changing production systems. This is a catalog interpretation, not a runbook.
Security analyst
Signals on file: CVSS 10.0, EPSS 0.2%. It is not currently listed in the CISA Known Exploited catalog. Weakness classes: CWE-20, CWE-200, CWE-77, CWE-78. Sources contributing to this record: cve_org, epss, github, osv. Public exploit references, when present, are outbound links only and are not proof of active exploitation. This is a catalog interpretation of stored metadata.
Exploitation and remediation
Exploitation evidence
Not listed as known exploited in CISA KEV. Not in the CISA KEV catalog.
Patch and remediation
No required-action text is stored yet. Use the vendor or CERT links in Sources for patch availability.
Safe detection guidance
Compare installed versions with the affected ranges below and verify the advisory from the original publisher. This site stores metadata and outbound links only; it does not ship exploit code or proof-of-concept payloads.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Apr 24, 2026 · GitHub Advisory Database
Detected
# Summary Gemini CLI ( ) and the GitHub Action are being updated to harden workspace trust and tool allowlisting, in particular when used in untrusted environments like GitHub Actions. This update introduces a breaking change to how non-interactive (headless) environments handle folder trust, which may impact existing CI/CD workflows under specific conditions. # Details Folder Trust in Headless Mo
Sep 25, 2026 · GitHub Advisory Database
Fix available
@google/gemini-cli fixed in 0.39.1; @google/gemini-cli fixed in 0.40.0-preview.3; google-github-actions/run-gemini-cli fixed in 0.1.22
Sep 25, 2026 · GitHub Advisory Database
Fix available
@google/gemini-cli fixed in 0.39.1
Sep 25, 2026 · GitHub Advisory Database
Fix available
@google/gemini-cli fixed in 0.40.0-preview.3
Sep 25, 2026 · GitHub Advisory Database
Fix available
google-github-actions/run-gemini-cli fixed in 0.1.22
Sep 25, 2026 · GitHub Advisory Database
Updated
# Summary Gemini CLI ( ) and the GitHub Action are being updated to harden workspace trust and tool allowlisting, in particular when used in untrusted environments like GitHub Actions. This update introduces a breaking change to how non-interactive (headless) environments handle folder trust, which may impact existing CI/CD workflows under specific conditions. # Details Folder Trust in Headless Mo
Affected
- GitHub Actions google-github-actions/run-gemini-cli0 → 0.1.22
- npm @google/gemini-cli0 → 0.39.1
- npm @google/gemini-cli0.40.0-preview.2 → 0.40.0-preview.3
Sources
- CVE.orgVulnerability recordCVE-2026-12537
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-12537
30-day exploitation probability 0.2%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-wpqr-6v78-jr5g
GitHub Advisory Database record mirrored by OSV.
github.com - OSV.devPackage advisoryGHSA-wpqr-6v78-jr5g
Gemini CLI: Remote Code Execution via workspace trust and tool allowlisting bypasses
osv.dev