# CVE-2026-13745: Arbitrary Code Execution in Gemini CLI via Untrusted Local .env Files Overriding GEMINI_CLI_HOME

> CVE-2026-13745: Arbitrary Code Execution in Gemini CLI via Untrusted Local .env Files Overriding GEMINI_CLI_HOME. CVSS 7.7 (CVSS 4.0).

Canonical: https://rewindex.com/cve/CVE-2026-13745
Last updated: 2026-09-23T10:17:06Z

- Published: 2026-09-10 08:33 UTC · Updated: 2026-09-23 10:17 UTC · Assigner: GoogleCloud
- CVSS: 7.7 (CVSS 4.0) · Severity: High
- EPSS: 0.65%, 51th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-15, CWE-829

## 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 vendors and products

- Google Cloud: Gemini CLI

## Tracked companies

- [Google Cloud](https://rewindex.com/company/google-cloud.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-13745)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-13745)
- [https://github.com/google-gemini/gemini-cli/releases/tag/v0.39.1](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.pwned.info/articles/homing-in-on-arbitrary-code-execution-within-gemini-cli/)
- [https://www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/](https://www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-13745 · Markdown: https://rewindex.com/cve/CVE-2026-13745.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-13745 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T02:05:15.325Z
