CVE-2026-13745: Arbitrary Code Execution in Gemini CLI via Untrusted Local .env Files Overriding GEMINI_CLI_HOME
High · CVSS 7.7 (CVSS 4.0)EPSS 0.65%, 51th percentilePublished Updated Assigner: GoogleCloud
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.
CWE-15, CWE-829
Tracked companies
Mapped from the CVE’s affected-product data, NVD CPE matches, vendor advisories or package feeds. A mapping means the vendor’s software is named, not that its hosted service was exposed.
Status incidents that name it
No tracked status incident names this CVE.
Affected vendors and products
Google Cloud: Gemini CLI
References
- CVE record on cve.org (opens in new tab)
- NVD entry (opens in new tab)
- github.com/google-gemini/gemini-cli/releases/tag/v0.39.1 (opens in new tab)
- www.pwned.info/articles/homing-in-on-arbitrary-code-execution-within-gemini-cli/ (opens in new tab)
- www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/ (opens in new tab)
- CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (opens in new tab)
- This product uses data from the NVD API but is not endorsed or certified by the NVD. (opens in new tab)
- Known Exploited Vulnerabilities catalog from CISA. (opens in new tab)
- EPSS scores from FIRST (Exploit Prediction Scoring System). (opens in new tab)