GHSA-wpqr-6v78-jr5g: Gemini CLI: Remote Code Execution via workspace trust and tool allowlisting bypasses
- Identifier
- GHSA-wpqr-6v78-jr5g
- Published
- Record updated
- Affected
- google-github-actions/run-gemini-cli < 0.1.22, fixed in 0.1.22
- @google/gemini-cli = 0.40.0-preview.2, fixed in 0.40.0-preview.3, released April 23, 2026, on the day of disclosure
- @google/gemini-cli < 0.39.1, fixed in 0.39.1, released April 23, 2026, on the day of disclosure
Summary
Gemini CLI (`@google/gemini-cli`) and the `run-gemini-cli` GitHub Action are updated to harden workspace trust and tool allowlisting, especially in untrusted environments such as GitHub Actions. In headless mode, earlier versions automatically trusted workspace folders, so malicious environment variables in a local `.gemini/` directory could lead to remote code execution, and under `--yolo` the fine-grained tool allowlist in `~/.gemini/settings.json` was ignored. The update requires explicit folder trust and makes the policy engine evaluate tool allowlisting under `--yolo` (version `0.39.1`), which can break existing CI/CD workflows.
Mitigation
The folder trust and tool allowlisting mitigations are available in `@google/gemini-cli` version `0.39.1` and `0.40.0-preview.3`. Users must review their workflows and take one of two approaches: 1. If the workflow runs on trusted inputs, set `GEMINI_TRUST_WORKSPACE: 'true'` in the workflow. 2. If the workflow runs on untrusted inputs, review the guidance in google-github-actions/run-gemini-cli to harden the workflow against malicious content, and set the environment variable. If the workflow specifies a version via `gemini_cli_version`, upgrade to one of the patched versions and audit the workflow settings that use Gemini CLI.
Related items
- MediumCVE-2026-111372: AI ChatBot for WooCommerce WoowBot plugin authorization bypass in RAG syncSame vendor · NVD/CVE Database
- HighCVE-2026-117560: ATXP Gemini CLI extension OS command injection in runAtxp() via MCP parametersSame vendor · NVD/CVE Database
- CriticalCVE-2026-90970: GitLab AI Gateway prompt template sandbox escape via crafted flow configurationSame vendor · NVD/CVE Database
- MediumCVE-2026-89278: GPTranslate WordPress plugin exposes plaintext API key to unauthenticated usersSame vendor · NVD/CVE Database
- CriticalCVE-2026-19407: Google Cloud Gemini Enterprise Agent Platform SDK for Python bucket squattingSame vendor · NVD/CVE Database