Gemini CLI GitHub Actions RCE (CVE-2026-85259) Google published CVE-2026-85259 on 2026-12-01 for a command-injection flaw (CWE-78, CVSS v4.0 10.0 Critical) in Gemini CLI's automated issue-triage workflows, which passed issue titles and bodies to a shell-capable agent and let crafted issue text run commands on the GitHub Actions runner in builds before 2026-05-12. Any public repository running the legacy `run-gemini-cli` triage, review or issue-fixer workflows before that date is exposed, and the CLI has 516,442 weekly npm downloads. No public proof of concept or exploitation is reported and the flaw is not in CISA KEV as of 2026-12-02; remediation requires updating the action and CLI to builds from 2026-05-12 or later (latest CLI 0.71.1 from 2026-11-24), setting `persist-credentials: false`, restricting shell tools and rotating `GEMINI_API_KEY` and `APP_PRIVATE_KEY`. Deep Dive https://blog.ostorlab.co/category/deep-dive.html Gemini CLI GitHub Actions RCE CVE-2026-85259 Gemini CLI issue workflows before 2026-05-12 could let crafted issue input execute commands. Review these workflows, permissions and credential exposure. TL;DR - Gemini CLI's automated issue-triage workflows passed the issue title and body to a shell-capable agent. A crafted issue could run commands on the GitHub Actions runner. Google published CVE-2026-85259 on 2026-12-01. - Any public repository running the legacy run-gemini-cli triage, review or issue-fixer workflows before 2026-05-12 is exposed. The CLI has 516,442 weekly npm downloads. - The CVE record rates it CVSS v4.0 10.0 Critical CWE-78 . No public proof of concept and no exploitation are reported, and it is not in CISA KEV as of 2026-12-02. - Update the action and the CLI to builds from 2026-05-12 or later, set persist-credentials: false , restrict shell tools and rotate GEMINI API KEY and APP PRIVATE KEY . See "How do I fix it?". Am I affected? You are exposed when all of these conditions hold: - A workflow uses google-github-actions/run-gemini-cli , or the Gemini CLI triage commands, at a revision before 2026-05-12. - The workflow runs on issue or pull-request text that an outsider can write. - The agent has a vulnerable path from untrusted input to command execution, including access to shell tools. - The issue-triggered workflow runs without a maintainer approval gate. Persisted checkout credentials and other accessible secrets increase the impact; their presence is not required for command execution. Public repositories are the main exposure. A maintainer can still be attacked through a pull request from a fork, because the workflow runs on text the contributor controls. Private repositories are exposed when a lower-trusted member or an outside collaborator can open issues or pull requests. The CVE gives a date, not a semantic version. Google fixed the workflows on 2026-05-12, so the table uses that date as the cut-off. The latest CLI release is 0.71.1 from 2026-11-24. | Component | Affected builds | Fixed builds | |---|---|---| | run-gemini-cli GitHub Action | Commits before 2026-05-12 | Commits from 2026-05-12 | | @google/gemini-cli | Releases before 2026-05-12 | Releases from 2026-05-12; latest 0.71.1 | | Triage command templates | {echo ...} interpolation of issue text | Hardened templates plus tool restrictions | Find the workflows in a repository: grep -R "run-gemini-cli" .github/workflows Find the issue-triggered commands: grep -R -E "gemini- triage|scheduled-triage|issue-fixer|invoke " .github/workflows Check whether the checkout persists the token: grep -R -A6 "actions/checkout" .github/workflows | grep -n "persist-credentials" An empty result means at least one checkout still uses the default, which persists the token in the local Git configuration. Check every workflow that processes untrusted input, not only the first match. Check the CLI version on the runner: npx @google/gemini-cli --version Check the action reference and its date: grep -R "google-github-actions/run-gemini-cli@" .github/workflows Check whether shell execution is enabled in the workflow settings: grep -R -E "run shell command|--yolo|coreTools" .github/workflows .gemini How do I fix it? Update the action and the CLI, remove the persisted token, restrict the agent's tools and rotate the secrets. A single change is not enough. 1. Update the CLI to 0.71.1 or later: npm install -g @google/gemini-cli@0.71.1 1. Update google-github-actions/run-gemini-cli to a commit from 2026-05-12 or later. The upstream examples use @main , which is not a fixed target. Pin the action to a full commit SHA in the hardened range and record that SHA in the workflow. 2. Add persist-credentials: false to every actions/checkout step in the affected workflows: - uses: actions/checkout@v6 with: persist-credentials: false 1. Remove run shell command and --yolo from the triage jobs. Keep the GitHub MCP tool allowlist narrow, as the hardened gemini-invoke and gemini-review examples do. 2. Disable or delete the legacy automated triage workflows if you cannot harden them. A maintainer approval gate or a label trigger that only maintainers can apply also removes the anonymous path. 3. Rotate GEMINI API KEY , APP PRIVATE KEY , GOOGLE API KEY and every other secret that was present on a runner that executed a vulnerable workflow. Removing the workflow does not revoke a token that was already read. persist-credentials: false prevents checkout from persisting its credential. Commands may still use other available credentials, including GITHUB TOKEN ; restrict tools and permissions and require approval for untrusted input. If you cannot upgrade, the workaround is to stop running the agent on untrusted input: 1. Disable the issues and pull request triggers on the Gemini workflows. 2. Run the triage only from a workflow dispatch event that a maintainer starts. 3. Keep the checkout's persist-credentials at false and scope GITHUB TOKEN to contents: read . The workaround limits who can supply input; it does not repair the vulnerable agent execution path. A maintainer must still review the input before starting a manual run. What is the root cause? The templates run {echo $ISSUE TITLE} and {echo $ISSUE BODY} through the CLI shell processor and append the command output to the model prompt. Ordinary shell expansion does not reparse metacharacters inside those environment values as commands. This ingestion path alone does not establish direct shell injection before the model runs. .github/commands/gemini-triage.toml Issue Title : {echo $ISSUE TITLE} Issue Body : {echo $ISSUE BODY} The same pattern appears in the issue fixer, which places the title and body inside an XML context block: .github/commands/gemini-issue-fixer.toml