Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit malicious PR with .gemini/.env
-
DeliveryCI runs headless Gemini CLI
-
ExploitWorkspace auto-trusted, .env loaded
-
ExecutionCrafted command reaches container launcher
-
PersistPre-sandbox code execution on runner
-
ImpactSteal 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (GoogleCloud).
CVSS VectorVendor: GoogleCloud
Lifecycle Timeline
2DescriptionCVE.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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
EUVD-2026-38790
GHSA-jj69-4grx-fqj5
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB