9.2
CRITICAL CVSS 4.0
CVE-2026-13745
Arbitrary Code Execution in Gemini CLI via Untrusted Local .env Files Overriding GEMINI_CLI_HOME
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.

INFO

Published Date :

Sept. 10, 2026, 9:17 a.m.

Last Modified :

Sept. 23, 2026, 10:17 a.m.

Remotely Exploit :

Yes !

Source :

f45cbf4e-4146-4068-b7e1-655ffc2c548c
Affected Products

The following products are affected by CVE-2026-13745 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 4.0 CRITICAL f45cbf4e-4146-4068-b7e1-655ffc2c548c
CVSS 4.0 CRITICAL f45cbf4e-4146-4068-b7e1-655ffc2c548c
CVSS 4.0 HIGH f45cbf4e-4146-4068-b7e1-655ffc2c548c
Solution
Update Gemini CLI and GitHub Action to prevent code execution via untrusted .env files.
  • Update Gemini CLI to the latest version.
  • Update the Gemini GitHub Action.
  • Remove untrusted .env files.
  • Review Gemini CLI security configurations.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-13745.

URL Resource
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/
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-13745 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-13745 weaknesses.

CAPEC-13: Subverting Environment Variable Values Subverting Environment Variable Values CAPEC-69: Target Programs with Elevated Privileges Target Programs with Elevated Privileges CAPEC-76: Manipulating Web Input to File System Calls Manipulating Web Input to File System Calls CAPEC-77: Manipulating User-Controlled Variables Manipulating User-Controlled Variables CAPEC-146: XML Schema Poisoning XML Schema Poisoning CAPEC-176: Configuration/Environment Manipulation Configuration/Environment Manipulation CAPEC-203: Manipulate Registry Information Manipulate Registry Information CAPEC-270: Modification of Registry Run Keys Modification of Registry Run Keys CAPEC-271: Schema Poisoning Schema Poisoning CAPEC-579: Replace Winlogon Helper DLL Replace Winlogon Helper DLL CAPEC-175: Code Inclusion Code Inclusion CAPEC-201: Serialized Data External Linking Serialized Data External Linking CAPEC-228: DTD Injection DTD Injection CAPEC-251: Local Code Inclusion Local Code Inclusion CAPEC-252: PHP Local File Inclusion PHP Local File Inclusion CAPEC-253: Remote Code Inclusion Remote Code Inclusion CAPEC-263: Force Use of Corrupted Files Force Use of Corrupted Files CAPEC-538: Open-Source Library Manipulation Open-Source Library Manipulation CAPEC-549: Local Execution of Code Local Execution of Code CAPEC-640: Inclusion of Code in Existing Process Inclusion of Code in Existing Process CAPEC-660: Root/Jailbreak Detection Evasion via Hooking Root/Jailbreak Detection Evasion via Hooking CAPEC-695: Repo Jacking Repo Jacking CAPEC-698: Install Malicious Extension Install Malicious Extension

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-13745 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-13745 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by f45cbf4e-4146-4068-b7e1-655ffc2c548c

    Sep. 23, 2026

    Action Type Old Value New Value
    Changed Description A vulnerability in the Gemini CLI and associated GitHub Action allowed an unprivileged attacker to achieve an arbitrary code execution in Gemini CLI via untrusted local .env files overriding GEMINI_CLI_HOME. 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.
    Added CVSS V4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber
    Removed CVSS V4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber
    Added CWE CWE-15
    Added CWE CWE-829
    Removed CWE CWE-20
    Removed CWE CWE-78
    Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/13xxx/CVE-2026-13745.json">CVE-2026-13745</a>
    Added Reference https://github.com/google-gemini/gemini-cli/releases/tag/v0.39.1
    Added Reference https://www.pwned.info/articles/homing-in-on-arbitrary-code-execution-within-gemini-cli/
    Added Reference https://www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/
    Removed Reference https://github.com/google-github-actions/run-gemini-cli/releases/tag/v0.1.22
    Removed Reference https://github.com/google-github-actions/run-gemini-cli/security/advisories/GHSA-wpqr-6v78-jr5g
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Sep. 10, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-13745', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'yes'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-09-10T15:03:19.734151Z'}
  • New CVE Received by f45cbf4e-4146-4068-b7e1-655ffc2c548c

    Sep. 10, 2026

    Action Type Old Value New Value
    Added Description A vulnerability in the Gemini CLI and associated GitHub Action allowed an unprivileged attacker to achieve an arbitrary code execution in Gemini CLI via untrusted local .env files overriding GEMINI_CLI_HOME.
    Added CVSS V4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber
    Added CWE CWE-20
    Added CWE CWE-78
    Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/13xxx/CVE-2026-13745.json">CVE-2026-13745</a>
    Added Reference https://github.com/google-github-actions/run-gemini-cli/releases/tag/v0.1.22
    Added Reference https://github.com/google-github-actions/run-gemini-cli/security/advisories/GHSA-wpqr-6v78-jr5g
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.