Back Beyondmachines Google Patches Critical Gemini CLI Flaw Allowing Remote Code Execution
Google has fixed a critical security vulnerability in the automated triage workflows of its Gemini CLI and the associated GitHub Action. The flaw resides in the automation surrounding the CLI, not the Gemini model itself. It affects legacy workflows used for sorting issues, reviewing contributions, and preparing automated fixes within GitHub repositories.
The flaw is tracked as CVE-2026-85259 (CVSS score 10.0) . It is a code injection vulnerability in the automated triage workflows of Google Gemini CLI and the run-gemini-cli GitHub Action. Unauthenticated remote attackers can exploit this by submitting crafted text in GitHub issues or pull requests that the automated agent then processes. Successful exploitation allows an attacker to run arbitrary commands on the GitHub Actions runner and read sensitive files.
The vulnerability exists because legacy workflow templates passed untrusted input, such as issue titles and bodies, into environment variables that reached a shell-capable agent. Ordinary shell expansion does not automatically reparse these variables, the specific agent-and-tool execution path allowed the crafted input to trigger command execution. These commands run with the permissions of the workflow job, potentially exposing the GITHUB_TOKEN and other repository secrets.
The impact of an attack depends on the specific permissions granted to the GitHub Actions runner: If the workflow has write access or persists credentials, an attacker could modify repository content or steal long-lived tokens. Google's investigation confirmed that command execution and file reading are possible, but there are currently no reports of public proof-of-concept exploits or active exploitation in the wild.
Google Gemini CLI versions released before 2026-05-12
run-gemini-cli GitHub Action commits before 2026-05-12
Workflow templates using !{echo $ISSUE_TITLE} or !{echo $ISSUE_BODY} interpolation
Google Gemini CLI version 0.71.1 and later
run-gemini-cli GitHub Action commits from 2026-05-12 and later
Administrators should update the Gemini CLI and pin the run-gemini-cli action to a specific, hardened commit SHA. It is also necessary to manually update workflow files to include the persist-credentials: false setting for all checkout steps. Organizations should rotate any secrets, such as GEMINI_API_KEY or APP_PRIVATE_KEY , that were accessible to runners executing the vulnerable workflows.
