UTC
Critical

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
What it is

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.

What to do

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.

Affected
PackageRegistryAffectedFixed in
@google/gemini-clinpm< 0.39.10.39.1
@google/gemini-clinpm= 0.40.0-preview.20.40.0-preview.3

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.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].