{"id":"CVE-2026-13745","published":"2026-09-10T08:33:09Z","modified":"2026-09-23T09:48:39Z","title":"Arbitrary Code Execution in Gemini CLI via Untrusted Local .env Files Overriding GEMINI_CLI_HOME","vendor":"Google Cloud","product":"Gemini CLI","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.7,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/U:Amber","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00652,"percentile":0.52171,"provenance":"source"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"},{"id":"CWE-15","name":"External Control of System or Configuration Setting"}],"references":[{"url":"https://github.com/google-gemini/gemini-cli/releases/tag/v0.39.1","tags":[]},{"url":"https://www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/","tags":[]},{"url":"https://www.pwned.info/articles/homing-in-on-arbitrary-code-execution-within-gemini-cli/","tags":[]}],"priority":{"score":15.8,"factors":[{"name":"EPSS percentile","points":10.43},{"name":"CVSS severity","points":5.39}]},"vendorSlug":"google-cloud","affectedVersions":[{"vendor":"Google Cloud","product":"Gemini CLI","versions":["< 0.39.1"]}],"solutions":{"items":["* 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."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-38","name":"Leveraging/Manipulating Configuration File Search Paths"},{"id":"CAPEC-13","name":"Subverting Environment Variable Values"}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-09-10T15:03:19.734151Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-75326","exploited":false,"provenance":"source"}}