Skip to content
MediumNewsLLM-specific

Max-severity RCE flaw found in Google Gemini CLI

Published
Record updated
View JSON

Summary

Novee Security researchers disclosed a max-severity flaw in @google/gemini-cli and its run-gemini-cli GitHub Action, which can lead to remote code execution where untrusted inputs are processed. In affected versions, Gemini CLI running in CI environments automatically trusted workspace folders for loading configurations and environment variables, letting an unprivileged external attacker inject malicious configuration that triggered command execution on the host before the agent's sandbox initialized. Google assessed a CVSS score of 10.0, and no CVE ID had been assigned at the time of reporting.

Mitigation

The issue was fixed in @google/gemini-cli versions 0.39.1 and 0.40.0-preview.3, and in run-gemini-cli version 0.1.22. Google removed implicit workspace trust in headless environments and enforced stricter tool controls, and the fix closed a gap in "--yolo" mode so tool allowlisting is enforced. Workflows that pin a specific gemini-cli-version are advised to upgrade to a patched release and review their existing Gemini CLI configurations to ensure they don't rely on unsafe defaults.