For more than six months, a CVSS 10 flaw in Google’s own AI triage pipelines had a fix but no name. The pull requests that closed it in May were titled “chore” and described as a generic standardisation; the CVE only appeared on 1 December 2026.
In short: the Gemini CLI vulnerability CVE-2026-85259 lets an unauthenticated attacker run commands or read sensitive files through a crafted GitHub issue, in the automated triage workflows of Gemini CLI (google-gemini/gemini-cli) and the google-github-actions/run-gemini-cli GitHub Action. Versions before 2026-05-12 are affected. It was first published on 1 December 2026 as GitHub advisory GHSA-g6vw-c6rx-j9ph and the matching CVE record, with Google as the issuing authority.
- What is CVE-2026-85259?
- Who reported it, and when?
- How does the Gemini CLI vulnerability work?
- Background: the April trust model update
- How does it compare with similar CI flaws?
- Who is affected?
- How do you detect exploitation?
- How do you fix CVE-2026-85259?
- It is not a remote hack of Gemini
- Open questions
- The bottom line
- Sources
What is CVE-2026-85259?
CVE-2026-85259 is a code injection vulnerability in the GitHub workflows that use Gemini CLI to triage issues automatically. The GitHub advisory database classifies it as CWE-78, OS command injection, and scores it 10.0 under CVSS 4.0, the maximum: network attack, low complexity, no privileges, no user interaction, and high impact on both the vulnerable system and systems beyond it.
The official description is one sentence. It says an unauthenticated remote attacker can execute arbitrary commands or read sensitive files using crafted GitHub issue inputs, in Gemini CLI and run-gemini-cli GitHub Action versions prior to 2026-05-12.
Gemini CLI is Google’s open-source command-line AI agent. It runs Gemini models in a terminal and gives them tools such as shell commands and file reads. On 2 December 2026 the google-gemini/gemini-cli repository had 109,517 stars and 15,063 forks under the Apache-2.0 licence, and its latest release was v0.72.0. The npm package @google/gemini-cli was downloaded 516,442 times in the week of 24 to 30 November.
run-gemini-cli is the official GitHub Action that runs the same agent inside GitHub Actions, GitHub’s built-in CI/CD service. It had 2,140 stars and 293 forks. Its repository ships ready-made workflows for issue triage, pull request review and issue fixing that teams copy into their own repositories.
Who reported it, and when?
The first public record is the CVE entry and GitHub advisory GHSA-g6vw-c6rx-j9ph, published on 1 December 2026. Ostorlab gives the CVE publication time as 20:22 UTC; the GitHub advisory database shows 21:31 UTC. No earlier description of this specific flaw turned up in searches.
Neither the GitHub advisory nor Ostorlab names a reporter. A write-up republished on malware.news credits Dan Lisichkin, and Lisichkin, of Pillar Security, is also credited on the related April advisory. Treat the December attribution as reported by that one source until Google confirms it.
The fixes that came first
The advisory lists two references as the fix. Both are public pull requests from May:
run-gemini-cliPR 518, “chore: align checkout steps with standard practices”, merged on 11 May 2026. It touched 6 workflow files.gemini-cliPR 26897, “chore: update checkout action configuration in workflows”, merged on 12 May 2026. It touched 33 workflow files and calls itself “a generic update”.
Both set persist-credentials: false on every actions/checkout step. Nothing in either pull request mentions security. This is a silent fix: the code was public for 203 days, but the risk was not.
How does the Gemini CLI vulnerability work?
The public record gives no payload and no exact execution path. Ostorlab points this out directly. What the record does give, combined with the workflow files before and after the fix, shows the shape of the problem. This walk-through stays at that conceptual level.
Step 1: an issue starts an AI agent
The triage workflows fire automatically. The gemini-cli repository’s own automated triage workflow, as it stood before the fix, ran when an issue was opened or reopened and when an issue comment was created. On a public repository, anyone with a GitHub account can do both.
Step 2: untrusted text becomes part of the prompt
The issue title and body are written into the agent’s input. In the run-gemini-cli triage command template, they are inserted into the prompt through Gemini CLI’s shell expansion feature. In the gemini-cli workflow, they are written to a file that the agent is told to read. Either way, attacker-written text sits inside the instructions an AI model is following.
That is the setup for prompt injection: text crafted to make a language model ignore its task and follow the attacker’s instructions instead.
Step 3: the agent has tools on the runner
The pre-fix gemini-cli triage workflow allowed the agent two tools: read_file, and a shell tool restricted to echo. It also set GEMINI_CLI_TRUST_WORKSPACE to true, so the repository’s own configuration was trusted. The run-gemini-cli template goes further and tells the model to execute a shell command that writes its chosen labels into a file GitHub Actions reads between steps.
Step 4: a credential is waiting on disk
By default, actions/checkout saves the job’s GitHub token in the cloned repository’s .git/config file so later git commands work. That is what persist-credentials controls. Before May, the triage workflow’s checkout step did not turn it off. An agent with a file-reading tool, steered by an issue, sits a short distance from that token.
The May fix removes exactly that token from disk. Ostorlab notes the limit of that change: it does not stop commands that use a token passed to the job some other way. Google’s own workflows deliberately pass an empty GITHUB_TOKEN to the agent step and keep write access in a separate job.
Where the sources disagree
The write-ups do not agree on the mechanism. Ostorlab argues that the template’s shell expansion on its own does not re-parse shell syntax, so it does not prove direct command injection before the model runs; it treats the CVE’s statement of command execution and file reading as the confirmed part. Other summaries call it plain shell injection. One AI-written news summary says credentials were exfiltrated; the record itself does not say that.
They also disagree on what the fix includes. Some summaries say the May changes also restricted tool allowlists; the two linked pull requests only change checkout settings. The malware.news write-up says it is unclear whether other changes belong to the fix.
Background: the April trust model update
CVE-2026-85259 is the second critical advisory for the same pairing this year. On 24 April 2026, Google published GHSA-wpqr-6v78-jr5g, now CVE-2026-12537, titled as remote code execution through workspace trust and tool allowlisting bypasses. It credits Elad Meged of Novee Security and Dan Lisichkin of the Pillar Security research team.
That advisory described two problems:
- Folder trust in headless mode. Headless mode is Gemini CLI running without a human at the keyboard, as in CI. In that mode the CLI automatically trusted the workspace folder and loaded its configuration, so a malicious
.gemini/directory in a pull request could lead to code execution. - Allowlists ignored under –yolo.
--yolois the flag that lets the agent run tools without asking for approval. Under it, fine-grained tool allowlists were ignored, so an entry meant to allow onlyechoallowed any command.
Both were fixed in @google/gemini-cli 0.39.1 and 0.40.0-preview.3, and run-gemini-cli v0.1.22 followed the same day. The malware.news write-up stresses that the April update does not by itself cover the December CVE, because the affected range runs to 12 May.
How does it compare with similar CI flaws?
| CVE-2026-12537 | CVE-2026-85259 | |
|---|---|---|
| Advisory | GHSA-wpqr-6v78-jr5g | GHSA-g6vw-c6rx-j9ph |
| Published | 24 April 2026 | 1 December 2026 |
| Severity | Critical | Critical, CVSS 4.0 10.0 |
| Component | CLI trust model, tool allowlists | Triage workflows |
| Trigger | Untrusted folder or input in headless mode | Crafted GitHub issue |
| Fix | CLI 0.39.1, 0.40.0-preview.3 | Releases and revisions from 2026-05-12 |
| Fix labelled as security | Yes, with advisory | No, “chore” pull requests |
| Exploited in the wild | Not reported | Not reported |
The pattern will be familiar to anyone who followed the wfx-loot GitHub Actions secret stealer: CI jobs that touch untrusted input and hold secrets are the target. The difference here is the middleman. Classic script injection needs attacker text to land inside a shell command. With an AI agent in the job, attacker text only needs to persuade the model, which is the same weakness behind AGENTS.md malware that instructs coding assistants.
Who is affected?
You are exposed if all of these are true:
- A repository runs Gemini CLI or
run-gemini-cliin GitHub Actions. - The workflow is triggered by issues, issue comments or pull request text from people you do not fully trust. On a public repository, that is everyone.
- The workflow file, the action revision or the CLI version predates 12 May 2026.
Private repositories are not automatically safe. Ostorlab notes that outside collaborators or lower-trust members who can open issues are enough.
How to check your exposure
- Search your organisation’s code for
run-gemini-cliand@google/gemini-cliinside.github/workflows/. - For each hit, look at the triggers (
issues,issue_comment,pull_request_target), the pinned action revision, and anygemini_cli_versioninput. - Check every
actions/checkoutstep in those workflows forpersist-credentials: false. - Remember that copied workflow files never update themselves. Updating the npm package does not change a YAML file someone pasted into your repository in 2025.
How do you detect exploitation?
No indicators of compromise have been published, and the sources list no MITRE ATT&CK mapping. Detection therefore means reviewing what your triage agents did.
Log sources
- GitHub Actions run logs for every triage, review and issue-fixer run. Brandefense advises looking for unexpected commands, file access or credential use.
- Gemini CLI telemetry. The
run-gemini-clitriage workflow writes local telemetry to.gemini/telemetry.logand can upload artifacts; thegemini-cliworkflow sent telemetry to Google Cloud. Tool calls recorded there show what the agent actually ran. - GitHub audit log for token use from unfamiliar addresses, label or issue edits you cannot explain, and new deploy keys or webhooks.
- Cloud and model provider logs for your Gemini or Google API keys, looking for use outside your runners.
Behaviours worth flagging
- Issues or comments that address the AI directly, contain shell syntax, or ask it to read files such as
.git/config. - Triage runs that call tools other than the expected label write, or that run longer than usual.
- Outbound connections from triage runners to hosts other than GitHub and Google APIs, which the malware.news write-up also recommends reviewing.
How do you fix CVE-2026-85259?
In priority order:
- Stop the trigger. If you cannot audit today, disable issue and comment triggers on Gemini triage workflows, or gate them behind a maintainer label or a manual
workflow_dispatch, as Ostorlab and malware.news both suggest. - Update the code. Move
@google/gemini-clito a current release (v0.72.0 on 2 December 2026) and pinrun-gemini-clito a full commit SHA from 12 May 2026 or later. If you setgemini_cli_version, raise it too. - Add
persist-credentials: falseto everyactions/checkoutstep in workflows that run an agent, whatever the agent. - Shrink the agent’s tools. Remove shell tools and
--yolofrom workflows that read untrusted text, and keep any allowlist to the narrowest set of commands. The run-gemini-cli triage workflow already set an empty core tool list before the fix. - Split privileges. Keep the agent job read-only with no GitHub token, and do writes such as labelling in a separate job, as Google’s own workflows do.
- Rotate secrets if a vulnerable workflow ran on public input: Gemini and Google API keys, GitHub App private keys, and anything else the job could read.
- Review past runs back to when the workflow was added, using the log sources above.
If your organisation connects GitHub to cloud identity, also read our guide to GitHub attack paths into tier zero; a token from a CI runner can be a starting point, not an end.
It is not a remote hack of Gemini
A CVSS 10 headline invites panic, so it is worth being precise about the limits.
- It does not affect the Gemini model or Google’s hosted services. It affects workflows that you run in your own repositories.
- It needs a workflow that feeds untrusted issue text to an agent. A developer using Gemini CLI interactively on their own code is not the scenario described.
- What an attacker gains depends on what the job holds. Google’s own workflows passed an empty token to the agent step and kept issue writes in another job, which limits the damage even before the fix.
- No one has reported exploitation, and there is no public proof of concept.
The score reflects the worst case: a public repository, a permissive workflow, and secrets on the runner. Many copied workflows will match that.
Open questions
- The exact path. The record names the impact but not the technique. Ostorlab and other summaries read the same evidence differently.
- The full fix. Only two checkout-hardening pull requests are cited. Whether other May changes belong to the fix has not been stated.
- The reporter. Only one secondary source names one.
- The delay. Neither Google nor the advisory explains why a CVSS 10 issue fixed in May was published in December, or whether downstream users were told earlier.
- Real-world exposure. No source counts how many public repositories still run pre-May copies of these workflows.
The bottom line
CVE-2026-85259 shows that an AI agent in CI turns every issue box into an input field for your build runner. The code fix is six months old, but copied workflows do not patch themselves, so search your repositories for Gemini triage workflows, cut their triggers and tools, and turn off persisted credentials today.
Sources
- GitHub advisory GHSA-g6vw-c6rx-j9ph (CVE-2026-85259)
- CVE record CVE-2026-85259
- GitHub advisory GHSA-wpqr-6v78-jr5g (CVE-2026-12537)
- run-gemini-cli pull request 518
- gemini-cli pull request 26897
- gemini-cli automated issue triage workflow (pre-fix revision)
- run-gemini-cli repository
- Ostorlab: Gemini CLI GitHub Actions RCE (CVE-2026-85259)
- Brandefense: CVE-2026-85259 patch status
- malware.news: Gemini CLI CVE-2026-85259, CVSS 10 flaw in GitHub triage workflows
- npm download statistics for @google/gemini-cli
This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.