CVE-2026-13745
Received Received - Intake

Arbitrary Code Execution in Gemini CLI via .env Override

Vulnerability report for CVE-2026-13745, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-10

Last updated on: 2026-09-10

Assigner: GoogleCloud

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-10
Last Modified
2026-09-10
Generated
2026-09-10
AI Q&A
2026-09-10
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
google gemini_cli 0.39.1
google gemini_cli 0.40.0_preview.3
google run_gemini_cli *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
CWE-20 The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

A vulnerability in the Gemini CLI and GitHub Action allowed an attacker to execute arbitrary code by exploiting untrusted local .env files. These files could override the GEMINI_CLI_HOME setting, enabling code execution without proper privileges.

Impact Analysis

An attacker could gain control over the Gemini CLI environment, potentially executing malicious commands, accessing sensitive data, or disrupting operations. This is especially risky in CI/CD workflows where automation handles untrusted inputs.

Mitigation Strategies

Update to the latest patched versions of Google's Gemini CLI (0.39.1 or 0.40.0-preview.3) and run-gemini-cli GitHub Action. Set GEMINI_TRUST_WORKSPACE to true only for trusted inputs. Enforce tool allowlisting in --yolo mode to prevent arbitrary command execution.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-13745. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart