CVE-2026-13745: Arbitrary Code Execution in Gemini CLI via Symlinked Environment Variables
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 GEMINICLIHOME.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
In your CI workflow, if the data/workspace is fully trusted, set GEMINI_TRUST_WORKSPACE: 'true' to ensure the workflow treats the workspace as trusted and mitigates untrusted local .env overriding GEMINI_CLI_HOME.
GitHub Actions workflow (Gemini CLI via run-gemini-cli) GEMINI_TRUST_WORKSPACE = true
Event History
Frequently Asked Questions
Does an attacker need elevated privileges to exploit this issue?
No. The issue is described as exploitable by an unprivileged attacker when untrusted local .env files can override GEMINI_CLI_HOME.
Which components should be included in triage?
Triage should include both Google Gemini CLI and the associated GitHub Action, as both are identified as affected by the provided information.