Gemini CLI: Remote Code Execution via workspace trust and tool allowlisting bypasses
CVE-2026-12537 · GHSA-wpqr-6v78-jr5g · published 2026-04-24 · updated 2026-09-24
- Severity
- Critical
- CVSS score
- 10.0
- Chance of exploitation (EPSS)
- 0.21%
- Fixed in
- 0.40.0-preview.3
- Exploitation No known exploitation
- Automatable Yes
- Technical impact Total
- CISA SSVC
This impact is limited to workflows using Gemini CLI in headless mode. Any use of Gemini CLI in headless mode without folder trust will require manual review to correctly configure folder trust. This affects all Gemini CLI GitHub Actions. Users must review their workflows, and take one of two approaches: 1\. If the workflow runs on trusted inputs (e.g. reviewing PRs from trusted collaborators), set GEMINITRUSTWORKSPACE: 'true' in your workflow. 2\. If the workflow runs on untrusted inputs, review our guidance in google-github-actions/run-gemini-cli to harden your workflow against malicious content, and set the environment variable.
Upgrade @google/gemini-cli to 0.40.0-preview.3 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
The folder trust and tool allowlisting mitigations are available in @google/gemini-cli version 0.39.1 and 0.40.0-preview.3. By default, the run-gemini-cli GitHub Action will receive and run the latest version of gemini-cli. However, if your workflow specifies a version of gemini-cli by setting the gemini\cli\version, you are encouraged to upgrade to one of the patched versions and audit the workflow settings that use Gemini CLI.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @google/gemini-cli | npm | < 0.39.1 | 0.39.1 |
| @google/gemini-cli | npm | = 0.40.0-preview.2 | 0.40.0-preview.3 |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.