What’s Vulnerable › Vulnerabilities
CVE-2026-13745: Arbitrary Code Execution in Gemini CLI via Untrusted Local .env Files Overriding GEMINI_CLI_HOME
- Severity: high (CVSS 7.7 v4.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-09-10 · updated 2026-09-23
- Weakness: CWE-15
Description
A vulnerability in the Gemini CLI prior to version 0.39.1 allows attackers to achieve arbitrary code execution by tricking a victim into starting the CLI within an untrusted directory. The vulnerability is triggered via untrusted .env files overriding GEMINI_CLI_HOME to load malicious configuration files and bypass folder trust prompts.
Affected products
- Google Cloud Gemini CLI: before 0.39.1 — fixed in 0.39.1
How to fix
Upgrade to a fixed version: Google Cloud Gemini CLI 0.39.1. Check the vendor advisory for mitigations.
References
- https://github.com/google-gemini/gemini-cli/releases/tag/v0.39.1
- https://www.pwned.info/articles/homing-in-on-arbitrary-code-execution-within-gemini-cli/
- https://www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/
Get alerted when CVE-2026-13745 or the next vulnerability affects your stack