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

High 7.7 Published Updated

Attackers can execute arbitrary code by tricking users into running Gemini CLI in untrusted directories with malicious .env files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-13745?

CVE-2026-13745 is a high-severity code injection vulnerability in Google Cloud Gemini CLI, published on 10 Sep 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-829, CWE-15

Which versions are affected by CVE-2026-13745?

How do I fix CVE-2026-13745?

No fix has been published for CVE-2026-13745 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-13745 being exploited?

There is no known exploitation of CVE-2026-13745 in the wild and no public exploit code.

Sources

Also known as GHSA-2255-3477-vp73.

Is CVE-2026-13745 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free