CVE-2026-13745
9.2Google Cloud · Gemini CLI
A vulnerability in the Gemini CLI and GitHub Action allows unprivileged attackers to achieve arbitrary code execution via untrusted local .env files that override the GEMINI_CLI_HOME environment variable.
Executive summary
A critical vulnerability in the Google Cloud Gemini CLI and associated GitHub Action allows unprivileged attackers to execute arbitrary code, posing a severe risk to CI/CD pipelines.
Vulnerability
This vulnerability involves improper input validation and OS command injection (CWE-20, CWE-78). An unauthenticated attacker can manipulate the GEMINI_CLI_HOME environment variable through untrusted local .env files to trigger arbitrary code execution within the CLI environment.
Business impact
The ability for an attacker to execute arbitrary code provides full control over the affected system or CI/CD runner. This vulnerability carries a CVSS score of 9.2, indicating a critical severity that could lead to unauthorized access to sensitive cloud credentials, repository data, and potential lateral movement within the production environment.
Remediation
Immediate Action: Upgrade the Google Cloud Gemini CLI to version 0.39.1 or higher and the run-gemini-cli GitHub Action to version 0.1.22 or higher.
Proactive Monitoring: Review CI/CD pipeline execution logs for unauthorized environment variable overrides or unexpected process spawning.
Compensating Controls: If immediate patching is not feasible, enforce strict trust boundaries in CI workflows and set GEMINI_TRUST_WORKSPACE to false to limit the CLI from acting on untrusted local configurations.
Exploitation status
Public Exploit Available: No (exploit_available: unknown)
Analyst recommendation
Given the critical nature of this vulnerability and the potential for full system compromise, organizations should prioritize updating their Gemini CLI and GitHub Action workflows immediately. Administrators must verify that all build runners are patched and that CI/CD configuration files are protected from unauthorized modification to prevent exploitation.
More Google Cloud CVEs
History
- Disclosed CVE record published
- Collected by CVE Brief via github
- Analyst report written
- Published in the daily brief critical section
Sources
Originally found and disclosed by Benjamin Faller, Redguard AG, per the CVE Program record.