On December 1, 2026, Google disclosed CVE-2026-85259, a critical code-injection vulnerability in legacy automated triage workflows for Gemini CLI and the run-gemini-cli GitHub Action. An attacker can supply crafted GitHub issue content that leads to arbitrary command execution or sensitive-file access on the workflow runner. The vulnerability has a Common Vulnerability Scoring System (CVSS) 4.0 score of 10.0. Dan Lisichkin is credited with reporting it. Google advisory
The exposure is in the automation around the agent. A triage job is supposed to read an issue and choose a label. If that input can influence commands on the runner, the same job becomes a route to the credentials and files available there. Upgrading a CLI dependency does not rewrite a vulnerable workflow copied into a repository.
Action Required
Review automated Gemini workflows that process external issues or pull requests. Update the workflow configuration, action, and CLI together; disable legacy public-issue triage until that review is complete. Google's guidance calls for disabling checkout credential persistence, restricting agent tools, avoiding unrestricted shell access and --yolo, and rotating secrets present on affected runners. Remediation guidance
What Is Affected
The GitHub advisory does not map the vulnerability to an affected npm version range or a specific fixed package version. The advisory is still marked unreviewed in the GitHub Advisory Database and has no Dependabot alerts, so a dependency scan will miss it. Check the workflow itself.
A repository created after May 12 can still contain an older copied workflow. Conversely, a repository using Gemini is not automatically vulnerable: its triggers, tool permissions, credential handling, and workflow revisions determine its exposure.
How the Vulnerable Workflow Reaches the Runner
GitHub Actions runs jobs on machines called runners. Gemini CLI executes on that machine and invokes the tools its configuration permits. The issue author controls the text being analyzed, but should not control those tools or the runner's credentials.
The pre-patch automated-triage workflow in the Gemini CLI repository shows the path:
- Opening or reopening an issue can trigger the job, subject to the repository and label conditions. Comment-triggered requests have a separate author-association check.
- The job checks out repository code onto an Ubuntu runner.
- A preparation step writes the issue title and body to
issue_context.md. - Gemini reads that file, analyzes the issue, and returns a label.
- A later step uses a GitHub credential to apply the label.
The analysis step explicitly clears one token variable. These two settings appear in its environment:
GITHUB_TOKEN: ''
GEMINI_CLI_TRUST_WORKSPACE: 'true'Its tool configuration still includes file reading and a restricted shell entry:
{
"coreTools": [
"run_shell_command(echo)",
"read_file"
]
}These are excerpts from the historical configuration, not recommended settings. The important boundary is between reading an issue as data and allowing that content to influence actions on the runner. A maintainer check on the comment trigger does not protect the separate issue-opening trigger.
Shell injection and prompt injection are different
Shell injection turns external text into executable command syntax. Prompt injection steers an AI agent through instructions embedded in material it is supposed to analyze. A workflow needs to account for both.
In this historical workflow, the preparation step passes the issue title and body through environment variables before writing the file. That avoids directly inserting issue expressions into the shell script, a pattern covered by GitHub's script-injection guidance. It does not make the resulting file trustworthy instructions for the agent.
Why Checkout Credentials Matter
Setting GITHUB_TOKEN to an empty string does not remove credentials saved elsewhere on the machine. Before the patch, the triage workflow's earlier checkout step had not disabled credential persistence. The workflow pinned actions/checkout v5, which writes that authentication into .git/config inside the workspace, the same directory the Gemini step could read with read_file. Checkout authentication could therefore remain available to subsequent commands even though the Gemini step's token variable was empty.
The advisory references two workflow-hardening pull requests:
The relevant checkout setting is:
with:
persist-credentials: falseAdd it to the existing checkout step's with inputs. It prevents checkout from retaining Git authentication for later commands. Older checkout versions stored that authentication in local Git configuration; checkout v6 moved the credential file to the runner's temporary directory. The opt-out remains important in either case. Checkout documentation
Both pull requests (PRs) change workflow configuration only. In the action repository, four of the six files already used the quoted value 'false'; those particular edits normalize the YAML rather than newly disabling persistence. Treat the patches as one hardening layer alongside Google's broader remediation.
Explicitly supplied credentials are a separate path. The historical Gemini issue-fixer workflow, for example, passes a GitHub token directly to Gemini despite already disabling checkout persistence. Removing saved Git authentication does not revoke a token deliberately given to the agent.
How to Check Your Repositories
From the root of a local Git checkout, run:
git grep -l -I -E \
'google-github-actions/run-gemini-cli|@google/gemini-cli' \
-- .github .gemini package.json package-lock.jsonThis lists matching tracked files in the current checkout without executing workflows. Git exits with status 1 when it finds no matches. Also inspect other branches, shared workflow repositories, scripts, and runner images; a local search does not cover those automatically.
For each matching workflow, check:
- Triggers: Can an external issue author start the job? Are approval checks applied to every relevant event, not only comments?
- Code and configuration: Which action commit and CLI version actually run? Inspect
.geminisettings, custom commands, and reusable workflows as well as the main YAML. - Tools: Does triage need shell execution or broad file access? Remove unnecessary tools and automatic approval.
- Credentials: Check checkout persistence, explicit token variables, API keys, GitHub App credentials, and any cloud identity available to the job. The historical triage job, for example, also had
id-token: write, Google Cloud Workload Identity inputs, andGEMINI_API_KEY. - Outputs: Validate agent-generated labels or other results before allowing them to drive privileged operations.
A match identifies automation to review. It does not establish that the repository was exploited or that credentials were stolen. As of December 2, 2026, the record's enrichment by CISA (Cybersecurity and Infrastructure Security Agency) lists exploitation as "none" and the attack as automatable.
Remediation and Verification
Update the workflow as well as the software
Replace affected copied configurations and update shared workflows. Review the action and CLI versions together, then pin the action to a full commit SHA (Secure Hash Algorithm) from the intended upstream repository. Pinning preserves a reviewed revision; it does not fix an unsafe workflow or make an old vulnerable revision safe. GitHub secure-use guidance
Keep analysis away from privileged operations
A label-only analysis job should not need repository-write credentials or general-purpose shell access. Where practical, run privileged operations in a separate, narrowly authorized job that consumes a validated result. A later step on the same machine is not a complete isolation boundary from arbitrary code running earlier in the job.
Limit both GitHub token and cloud permissions to what each job needs. Check credentials supplied explicitly even after disabling checkout persistence.
Rotate exposed secrets and inspect past runs
Identify executions of the affected configuration and the credentials available to them. Preserve workflow logs and audit records. Follow Google's rotation guidance for secrets present on affected runners, including Gemini API keys and GitHub App private keys. Review activity performed with those credentials; a workflow update cannot invalidate a key that has already been copied.
Test the replacement before re-enabling public triggers
Use a test repository and dummy credentials. Confirm that legitimate triage works, unauthorized triggers cannot reach privileged jobs, and the analysis process cannot perform writes beyond its role. Check the resolved action and CLI revisions in run logs. Re-enable external triggers only after reviewing the complete execution path.
How StepSecurity Helps
Fixing the workflow removes the vulnerable configuration. Harden-Runner adds visibility into what a monitored job actually does and controls where it can connect.
Investigate the affected workflow run
Open the security-insights link in the Harden-Runner job log, or select the run under Harden Runner → Workflow Runs in the StepSecurity dashboard. Review the job's destinations and detections, then correlate unexpected connections with the issue that triggered it. Enterprise process events provide executable paths, arguments, and parent process IDs to trace commands launched during analysis. Harden-Runner documentation
Focus on behavior that departs from legitimate triage. A shell or a GitHub connection on its own can be normal in agent workflows. Monitoring must have been active during the run to supply this evidence.
Restrict outbound connections
An enforced outbound allowlist limits access to destinations the workflow does not need. This can reduce exfiltration routes, but does not prevent all abuse of an allowed destination or replace the workflow fix. Configure the policy for the job's legitimate traffic and install Harden-Runner before the steps being monitored.
Start Free with StepSecurity to add runtime visibility and network controls to your GitHub Actions workflows.


