# CVE-2026-85259: Gemini CLI Triage Flaw Lets Issue Authors Run Code in GitHub Actions

Legacy Gemini CLI issue-triage GitHub Actions workflows let crafted issue content reach shell/file tools on the runner, exposing persisted checkout credentials and secrets.

- Payout: Research
- Severity: critical
- Program: Google
- Found by (vendor credit): Dan Lisichkin
- Write-up by: StepSecurity
- Disclosed: 2026-12-03
- CVE: CVE-2026-85259
- Write-up quality: 6/10
- Original: https://www.stepsecurity.io/blog/cve-2026-85259-gemini-cli-triage-flaw-lets-issue-authors-run-code-in-github-actions
- Library page: https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-cve-2026-85259-gemini-cli-triage-flaw-lets-issue-authors-run-code-in-github-actions
- Tags: area:ai domain:ai impact:internal-access impact:rce kind:research platform:threat-intel sev:critical tech:github-actions tech:llm technique:source-review vuln:command-injection vuln:prompt-injection vuln:secrets-leak

**Target:** GitHub Actions issue-triage workflow (run-gemini-cli action)
**Root cause:** The triage workflow writes attacker-controlled issue title/body to issue_context.md and feeds it to Gemini with read_file and run_shell_command(echo) tools enabled, while the earlier checkout step persisted Git credentials in .git/config readable by the agent.
**Steps:**
1. Issue open/reopen triggers the triage job (comment trigger has maintainer check, issue-open trigger does not).
2. Job checks out repo on Ubuntu runner without `persist-credentials: false`, writing auth into `.git/config`.
3. Prep step writes issue title/body to `issue_context.md` via env vars.
4. Gemini reads the file with `read_file` and has `run_shell_command(echo)`; embedded instructions steer it to read `.git/config` or run commands.
5. Later step applies label using GitHub credential; attacker gains runner command execution and sensitive-file access.
**How found:** Researcher examined the pre-patch triage workflow in the Gemini CLI repo, noting the boundary between reading an issue as data and letting it influence runner tools, and that clearing GITHUB_TOKEN does not remove credentials saved by checkout.
**Exploitation:** Attacker files a crafted GitHub issue whose body embeds instructions; the agent, permitted read_file and a restricted shell, can be steered to read persisted checkout credentials in .git/config or execute commands on the runner, then exfiltrate via allowed network egress.
**Escalation:** Persisted checkout token plus id-token: write, GCP Workload Identity inputs and GEMINI_API_KEY on the runner widen impact beyond the label step.
**Insight:** Clearing a token env var is not credential removal: actions/checkout persists auth into .git/config inside the workspace, so any agent tool with read_file or shell access in that workspace inherits it. Audit agent workflows for checkout persistence separately from explicit token vars.

## Proof of concept (copied exactly from the original report)

**Vulnerable triage workflow tool config with shell and file read**

```
{
 "coreTools": [
 "run_shell_command(echo)",
 "read_file"
 ]
}
```

**Checkout credential persistence fix setting**

```
with:
 persist-credentials: false
```

**git grep command to find affected workflows**

```
git grep -l -I -E \
 'google-github-actions/run-gemini-cli|@google/gemini-cli' \
 -- .github .gemini package.json package-lock.json
```

