Security Digest · Vulnerability record

CVE-2026-12537: Gemini CLI: Remote Code Execution via workspace trust and tool allowlisting bypasses

Improper Neutralization used in an OS Command in the container launcher in Google Gemini CLI (versions prior to 0.39.1) and run-gemini-cli GitHub Action (versions prior to 0.1.22) on headless CI platforms allows an unprivileged attacker to achieve pre-sandbox host-level code execution a maliciously crafted…

CVSS 10.0 Critical EPSS 0.2% · p11 Check exposure

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 0.2%, percentile 11: FIRST’s model estimates a 0.2% chance of exploitation activity in the next 30 days, higher than 11% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes @google/gemini-cli (npm) < 0.39.1, fixed in 0.39.1; @google/gemini-cli (npm) = 0.40.0-preview.2, fixed in 0.40.0-preview.3; google-github-actions/run-gemini-cli (GitHub Actions) < 0.1.22, fixed in 0.1.22. Check your lockfile, including transitive dependencies.
  • Editorial verdict: Check exposure. Gemini CLI and Claude Code Flaws Expose CI Secrets — If an AI coding agent runs in your CI on content outsiders can write (issues, PRs, comments), check versions and workflow permissions this week; laptop users on auto-update already have the fixes.

What it is

Improper Neutralization used in an OS Command in the container launcher in Google Gemini CLI (versions prior to 0.39.1) and run-gemini-cli GitHub Action (versions prior to 0.1.22) on headless CI platforms allows an unprivileged attacker to achieve pre-sandbox host-level code execution a maliciously crafted .gemini/.env file.

From the GitHub advisory

Summary

Gemini CLI (@google/gemini-cli) and the run-gemini-cli 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 .gemini/ directory.

Weakness type: CWE-20, CWE-77, CWE-78, CWE-200.

Product: @google/gemini-cli (npm) · Assigned by: GoogleCloud · Published: 2026-06-24

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npm@google/gemini-cli< 0.39.10.39.1
npm@google/gemini-cli= 0.40.0-preview.20.40.0-preview.3
GitHub Actionsgoogle-github-actions/run-gemini-cli< 0.1.220.1.22
VendorProductAffected versions (per CVE record)
Google CloudGemini CLI< 0.39.1
Google Cloudrun-gemini-cli GitHub Action< 0.1.22

Severity scores

Scored byCVSSScoreVector
GoogleCloud4.010 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/U:Clear
GitHub3.110.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.21% probability of exploitation activity in the next 30 days; percentile 11.

Timeline

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-wpqr-6v78-jr5g github.com
  2. CVE.org record CVE-2026-12537 cve.org
  3. NVD entry CVE-2026-12537 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com

Critical GitHub Actions advisories · Today’s Security Digest