CVE-2026-13745 PUBLISHED

Arbitrary Code Execution in Gemini CLI via Symlinked Environment Variables

Assigner: GoogleCloud
Reserved: 29.06.2026 Published: 10.09.2026 Updated: 10.09.2026

A vulnerability in the Gemini CLI and associated GitHub Action allowed an unprivileged attacker to achieve an arbitrary code execution in Gemini CLI via untrusted local .env files overriding GEMINI_CLI_HOME.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L/U:Amber
CVSS Score: 9.2

Product Status

Vendor Google Cloud
Product Gemini CLI
Versions Default: unaffected
  • affected from 0 to 0.39.1 (excl.)
Vendor Google Cloud
Product run-gemini-cli GitHub Action
Versions Default: unaffected
  • affected from 0 to 0.1.22 (excl.)

Solutions

  • Upgrade: Ensure you are using the latest version of gemini cli and follow the best practices guide https://github.com/google-github-actions/run-gemini-cli/blob/main/docs/trust-guidance.md
  • Configure Trust: Determine if your CI workflow operates on trusted or untrusted data. If the data is fully trusted, set GEMINI_TRUST_WORKSPACE: 'true' in your workflow.

Credits

  • Benjamin Faller, Redguard AG reporter

References

Problem Types

  • CWE-20 Improper input validation CWE
  • CWE-78 Improper neutralization of special elements used in an OS command ('OS command injection') CWE

Impacts

  • CAPEC-88 Command Injection