Skip to main content

Google Gemini CLI EUVDEUVD-2026-38790

| CVE-2026-12537 CRITICAL
Improper Input Validation (CWE-20)
10.0
CVSS 4.0 · Vendor: GoogleCloud
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit malicious PR with .gemini/.env
  2. Delivery
    CI runs headless Gemini CLI
  3. Exploit
    Workspace auto-trusted, .env loaded
  4. Execution
    Crafted command reaches container launcher
  5. Persist
    Pre-sandbox code execution on runner
  6. Impact
    Steal CI secrets and pivot

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires that Gemini CLI or the run-gemini-cli GitHub Action runs in headless (non-interactive) CI mode on a workspace whose contents are attacker-controlled, and that an attacker can place a crafted .gemini/.env file in that workspace - the prototypical case being a workflow that checks out and processes externally submitted pull requests or issues. The decisive prerequisite is the pre-patch automatic folder-trust behavior in headless mode that loads .env configuration without explicit trust. Limiting factors that reduce real-world risk: the vulnerability does not apply to interactive desktop usage, does not apply to CI that only processes trusted first-party code, and is neutralized once folders must be explicitly trusted (versions 0.39.1 / 0.1.22 and later); the separate --yolo allowlist-bypass path additionally requires --yolo mode plus an allowlist permitting run_shell_command and untrusted prompt content. No CISA KEV or EPSS data is available to confirm whether these conditions are being exploited in practice.

Impact

All severity signals point the same direction: the CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N with high confidentiality, integrity and availability impact on both the vulnerable and subsequent systems yields a maximal 10.0, reflecting unauthenticated, low-complexity, no-interaction exploitation that escapes the intended sandbox (host-level, pre-sandbox execution). The realistic risk is elevated specifically for organizations that run Gemini CLI in headless CI against untrusted inputs - the canonical example being workflows that auto-review externally submitted pull requests, where an attacker simply includes a crafted .gemini/.env file. That deployment dependency is the key nuance: the flaw is critical where this pattern exists and effectively inapplicable for interactive desktop use or CI that only processes trusted, internal code. EPSS and CISA KEV data are not provided in the input, so probability-of-exploitation and active-exploitation status are unknown; no POC is referenced. The CVSS-network vector is consistent with the description because the malicious .env arrives over the network as repository content, even though execution occurs on the runner. Net: treat as a high-priority patch for any team using Gemini CLI or run-gemini-cli in automated PR/issue-triage pipelines, while recognizing the absence of confirmed in-the-wild exploitation.

Exploit ScenarioDerived

An attacker opens a pull request to a repository whose CI uses run-gemini-cli to auto-review submissions, including a malicious .gemini/.env file in the branch. When the headless Gemini CLI auto-trusts the workspace and loads those environment variables before sandboxing, the attacker's payload executes as host-level code on the CI runner, potentially exposing repository secrets and the build environment. No public exploit code is referenced, but the attack requires no authentication, no user interaction, and low complexity per the CVSS vector.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 24, 2026

Pre-sandbox host-level code execution in Google Gemini CLI (versions prior to 0.39.1) and the run-gemini-cli GitHub Action (prior to 0.1.22) allows an unprivileged attacker to run arbitrary commands on CI/CD runner hosts by planting a malicious .gemini/.env file in an untrusted workspace. In headless mode the tool automatically trusted workspace folders and loaded their environment variables before sandboxing, so a workflow that processes attacker-controlled content (for example reviewing a submitted pull request) would execute attacker-supplied commands on the host. No public exploit has been identified at time of analysis, but Google rates this CVSS 4.0 10.0 and a vendor advisory (GHSA-wpqr-6v78-jr5g) with fixed releases is available.

RemediationAI

Vendor-released patch: upgrade @google/gemini-cli to 0.39.1 or later (preview users to 0.40.0-preview.3 or later) and upgrade the run-gemini-cli GitHub Action to 0.1.22 or later, per advisory GHSA-wpqr-6v78-jr5g (https://github.com/google-github-actions/run-gemini-cli/security/advisories/GHSA-wpqr-6v78-jr5g). The fix aligns headless behavior with interactive mode so folders must be explicitly trusted before configuration files such as .env are loaded; note the breaking change that existing CI workflows relying on automatic trust will fail to load workspace-specific settings until they adopt explicit trust mechanisms. Where immediate upgrade is not possible, do not run Gemini CLI in headless mode against untrusted directory contents such as forked or community pull requests, and isolate any such workflow on ephemeral runners with no secrets exposure; the trade-off is reduced automation coverage for external contributions. Additionally, when using --yolo mode on patched versions, define a strict fine-grained run_shell_command allowlist of only known-safe commands (now properly enforced by the policy engine), accepting that some previously-passing workflows may fail silently until their allowlists are corrected.

Affected VersionsENISA

Gemini CLI 0 <0.39.1
run-gemini-cli GitHub Action 0 <0.1.22

Affected Packages

npm @google/gemini-cli fix: 0.39.1, 0.40.0-preview.3
npm google-github-actions/run-gemini-cli fix: 0.1.22
euvd gemini_cli fix: 0.39.1
euvd run_gemini_cli_github_action fix: 0.1.22

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected technology is Google's Gemini CLI (npm @google/gemini-cli), an AI coding agent that runs shell commands and tools, and its wrapper the run-gemini-cli GitHub Action used to embed that agent in CI/CD pipelines. The root cause is classed as CWE-20 (Improper Input Validation), realized here as improper neutralization of OS commands in the container launcher: in non-interactive 'headless' execution the CLI auto-trusted the working directory and processed local configuration such as .gemini/.env before the sandbox boundary was established. Because environment variables and folder-trust settings were honored from untrusted, attacker-controllable directory contents, malicious values could influence the launcher and reach host-level command execution. The CPE data scopes this to cpe:2.3:a:google_cloud:gemini_cli and cpe:2.3:a:google_cloud:run-gemini-cli_github_action. A related hardening in the same release also makes the policy engine enforce fine-grained tool allowlists under --yolo mode, which previously could be bypassed (e.g. an allowlist of run_shell_command(echo) effectively permitting any command) and enable RCE via prompt injection.

Know when Gemini Cli gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GoogleCloud) PRIMARY 10.0 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/U:Clear
vuln.today AI 10.0 CRITICAL

Malicious .env arrives as repo content over the network (AV:N) and runs unauthenticated with no interaction in automated CI (PR:N/UI:N); pre-sandbox host execution escapes the intended sandbox (S:C) with full host impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (GoogleCloud).

CVSS VectorVendor: GoogleCloud

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

2
Patch available
Jun 24, 2026 - 15:02 EUVD
CVE Published
Jun 24, 2026 - 13:37 cve.org
CRITICAL 10.0

DescriptionCVE.org

Improper Neutralization used in an OS Command in the container launcher in Google Gemini CLI (versions prior to 0.39.1) and run-gemini-cli GitHub Action (versions prior to 0.1.22) on headless CI platforms allows an unprivileged attacker to achieve pre-sandbox host-level code execution a maliciously crafted .gemini/.env file.

Executive ViewAI

Why It Matters

Google Gemini CLI (versions <0.39.1) and run-gemini-cli GitHub Action (versions <0.1.22) enable unprivileged attackers to execute arbitrary commands on CI/CD runner hosts by planting malicious configuration files in attacker-controlled code. Organizations using these tools to process external contributions-particularly open-source projects accepting pull requests-face immediate risk of infrastructure compromise and supply-chain attack. No public exploit identified at time of analysis, but CVSS 10.0 severity reflects the critical nature of pre-authentication remote code execution on CI/CD systems.

Business Impact: Severe
Compensating Controls

Vendor-released patch: Google Gemini CLI 0.39.1, run-gemini-cli GitHub Action 0.1.22. Interim: disable processing of untrusted code through these tools; require manual code review and explicit approval before CI/CD execution; run these tools in isolated, ephemeral, or heavily monitored environments only.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Medium
Google-backed AI dev CLI with growing but CI-specific adoption
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

70
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy