Threat reportVulnerabilityTL-2026-7287
Critical Gemini CLI / run-gemini-cli GitHub Action Vulnerability Enables Unauthenticated Command Execution (CVE-2026-85259)
A critical OS command injection flaw (CWE-78, CVSS v4.0 10.0) in legacy Gemini CLI triage workflows and the run-gemini-cli GitHub Action (commits and releases before 2026-05-12) lets a remote, unauthenticated attacker who can submit text such as a GitHub issue run commands or read sensitive files with the workflow job's permissions.
Key facts
| Identifiers | TL-2026-7287, CVE-2026-85259 |
|---|---|
| Also known as | GHSA-g6vw-c6rx-j9ph |
| Severity | CRITICAL |
| CVSS | 10 (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber) |
| First disclosed | |
| EPSS | CVE-2026-85259: 0.4% (44.2th percentile) |
| Affected products | Google run-gemini-cli (google-github-actions/run-gemini-cli GitHub Action); Google Gemini CLI (@google/gemini-cli) and legacy triage, review and issue-fixer workflow templates |
| Weaknesses (CWE) | CWE-78 |
| Tools | run_shell_command |
| MITRE ATT&CK techniques | T1005 Data from Local System, T1059.004 Unix Shell, T1190 Exploit Public-Facing Application, T1528 Steal Application Access Token, T1552.001 Unsecured Credentials: Credentials In Files |
| Motivation | UNKNOWN |
| Target sectors | technology, software development, open source |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 6 cited sources |
Detection coverage
As of 2026-12-02, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-7287 across Splunk SPL, Microsoft KQL and Sigma, covering 10 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: CVE-2026-85259 Gemini CLI Agent Spawning Shell with Execution/Staging Primitives - Exploitation
Detects a shell spawned by a Gemini CLI / run-gemini-cli agent process (the run_shell_command path reachable from attacker-controlled ISSUE_TITLE / ISSUE_BODY text in legacy triage workflows, CVE-2026-85259 / GHSA-g6vw-c6rx-j9ph) whose command line carries execution or staging primitives: base64 decode, /dev/tcp, reverse-shell idioms, inline interpreters, chmod +x or pipe-to-shell. Each hit is classified (decode_stage, reverse_shell, stage_exec, inline_interpreter) to speed triage. The exact public trigger is not established and no PoC exists, so this is behaviour-first coverage of the post-injection shell, not a payload signature. Applies to self-hosted runners and developer hosts with Linux process telemetry.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1190, T1059.004, T1140, T1105
- Data sources: sysmon_for_linux, index=linux sourcetype=sysmon:linux
- Severity: high
- Confidence: medium
Splunk SPL
index=linux sourcetype="sysmon:linux" EventCode=1 earliest=-24h (ParentCommandLine="*gemini*" OR ParentImage="*gemini*") Image IN ("*/bash","*/sh","*/dash","*/zsh") CommandLine IN ("*base64 -d*","*base64 --decode*","*/dev/tcp/*","*bash -i*","*nc -e*","*ncat -e*","*python -c*","*python3 -c*","*perl -e*","*chmod +x*","*| sh*","*| bash*","*mkfifo*") ```comment: shell child of a Gemini CLI agent with execution or staging primitives (CVE-2026-85259 post-injection shell)```
| eval primitive=case(match(CommandLine,"base64 +(-d|--decode)"),"decode_stage", match(CommandLine,"/dev/tcp/|bash -i|nc -e|ncat -e|mkfifo"),"reverse_shell", match(CommandLine,"chmod [+]x|[|] *(ba)?sh"),"stage_exec", true(),"inline_interpreter")
| stats count min(_time) as first_seen max(_time) as last_seen values(primitive) as primitives values(CommandLine) as commands values(ParentCommandLine) as gemini_parent by host User
| convert ctime(first_seen) ctime(last_seen)
| table first_seen last_seen host User count primitives gemini_parent commandsMicrosoft KQL
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessCommandLine has "gemini"
| where FileName in~ ("bash", "sh", "dash", "zsh")
| where ProcessCommandLine has_any ("base64 -d", "base64 --decode", "/dev/tcp/", "bash -i", "nc -e", "ncat -e", "python -c", "python3 -c", "perl -e", "chmod +x", "mkfifo")
or ProcessCommandLine contains "| sh" or ProcessCommandLine contains "| bash"
| extend Primitive = case(
ProcessCommandLine has_any ("base64 -d", "base64 --decode"), "decode_stage",
ProcessCommandLine has_any ("/dev/tcp/", "bash -i", "nc -e", "ncat -e", "mkfifo"), "reverse_shell",
ProcessCommandLine has "chmod +x" or ProcessCommandLine contains "| sh" or ProcessCommandLine contains "| bash", "stage_exec",
"inline_interpreter")
| project Timestamp, DeviceName, AccountName, FileName, Primitive, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp descSigma
title: Gemini CLI Agent Spawning Shell With Execution Or Staging Primitives
id: 5e8c2a91-3b47-4d60-8f1e-a2c9d7046b35
status: experimental
description: Detects a shell spawned by a Gemini CLI / run-gemini-cli agent process whose command line contains execution or staging primitives (base64 decode, /dev/tcp, reverse shell idioms, inline interpreters, chmod +x, pipe to shell). Behavioural coverage for CVE-2026-85259 command injection in legacy Gemini CLI triage workflows.
references:
- https://github.com/advisories/GHSA-g6vw-c6rx-j9ph
- https://blog.ostorlab.co/gemini-cli-github-actions-rce-cve-2026-85259.html
author: Threadlinqs Team
date: 2026-12-02
tags:
- attack.initial-access
- attack.t1190
- attack.execution
- attack.t1059.004
- attack.defense-evasion
- attack.t1140
- attack.command-and-control
- attack.t1105
- cve.2026-85259
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentCommandLine|contains: 'gemini'
selection_child:
Image|endswith:
- '/bash'
- '/sh'
- '/dash'
- '/zsh'
CommandLine|contains:
- 'base64 -d'
- 'base64 --decode'
- '/dev/tcp/'
- 'bash -i'
- 'nc -e'
- 'ncat -e'
- 'python -c'
- 'python3 -c'
- 'perl -e'
- 'chmod +x'
- '| sh'
- '| bash'
- 'mkfifo'
condition: all of selection_*
falsepositives:
- Legitimate developer use of Gemini CLI to run scripted one-liners
- Agent-driven build or test jobs that decode base64 fixtures
level: highKnown false positives:
- Developers running Gemini CLI interactively on workstations and asking it to run inline python -c or base64 one-liners
- Agent-driven CI jobs that legitimately decode base64 fixtures or chmod +x helper scripts
Tuning notes: Replace index=linux with the index that holds your Sysmon for Linux or equivalent process telemetry. Scope to self-hosted runner host groups first, since GitHub-hosted runners are not instrumented. Allowlist known-good build commands by CommandLine once baselined. Because the public trigger is unknown, treat hits as high-priority triage rather than confirmed exploitation.
- CVE-2026-85259 Gemini CLI Launched with --yolo Spawning Shell - Exploitation Surface · unlock with TL Creds
- CVE-2026-85259 Gemini CLI Agent Shell Reading Persisted Git Checkout Credentials - Post-Exploitation · unlock with TL Creds
- CVE-2026-85259 github-actions[bot] Repository Content or Protection Changes - Token Abuse / Supply Chain · unlock with TL Creds
- CVE-2026-85259 Legacy Gemini Template Shell Processor Echoing ISSUE_TITLE / ISSUE_BODY - Exploitation Surface · unlock with TL Creds
- CVE-2026-85259 Gemini CLI Agent Process Reading Credential Files - Post-Exploitation · unlock with TL Creds
- CVE-2026-85259 Gemini CLI Agent Shell Making Outbound curl/wget to Non-Allowlisted Destinations - C2 / Exfiltration · unlock with TL Creds
- CVE-2026-85259 Gemini CLI Agent Shell Harvesting Environment Secrets (GITHUB_TOKEN / GEMINI_API_KEY / OIDC) - Post-Exploitation · unlock with TL Creds
- CVE-2026-85259 github-actions[bot] Changing Secrets, Webhooks or Deploy Keys - Token Abuse / Persistence · unlock with TL Creds
Indicators of compromise
As of 2026-12-02, Threadlinqs Intelligence tracks 10 indicators of compromise for TL-2026-7287.
Technical analysis
Google published the CVE on 2026-12-01; no public PoC, known exploitation or CISA KEV listing as of 2026-12-02.
CVE-2026-85259 (GHSA-g6vw-c6rx-j9ph) describes a code/command injection weakness in automated triage workflows built on Google's Gemini CLI and the google-github-actions/run-gemini-cli GitHub Action. The advisory states that an unauthenticated remote attacker can execute arbitrary commands or read sensitive files through crafted GitHub issue input. The weakness is classified as CWE-78 and scored CVSS v4.0 10.0 (AV:N/AC:L/AT:N/PR:N/UI:N with high confidentiality, integrity and availability impact on both vulnerable and subsequent systems). Affected scope is expressed by date rather than semantic version: run-gemini-cli commits and @google/gemini-cli releases before 2026-05-12, plus legacy triage, review and issue-fixer command templates that were copied into downstream repositories.
The documented data path is that issue titles and bodies reach the agent through the ISSUE_TITLE and ISSUE_BODY environment variables, and legacy command templates such as !{echo $ISSUE_TITLE} and !{echo $ISSUE_BODY} pass the output of the Gemini CLI shell processor into the model prompt. That prompt can then reach an agent-and-tool path with shell access (run_shell_command, often combined with --yolo auto-approval). Public analysis notes that ordinary shell expansion does not by itself re-parse metacharacters as commands, and neither the GHSA nor the vendor material publishes the payload or exact execution sequence, so the precise trigger is not publicly established. No reporter or researcher is credited in the sources reviewed.
Preconditions for exposure are an issue-triggered or pull-request-triggered workflow that runs on attacker-writable text, an agent with shell tooling, and no maintainer approval gate. Public repositories are the main exposure; private repositories are exposed if lower-trusted members or outside collaborators can open issues or PRs. Commands run with the job's permissions: the documented issue-fixer workflow passed GITHUB_TOKEN to the agent step and provider keys (such as GEMINI_API_KEY) as action inputs, so a token with write scope could in principle be used to modify repository content. No such modification is confirmed. APP_PRIVATE_KEY belongs to an earlier token-minting step and was not shown as an agent environment variable.
Fixes: google-gemini/gemini-cli PR #26897 (merged 2026-05-12, commit 9fe8643) sets persist-credentials: false on every actions/checkout step across 33 workflow files, and google-github-actions/run-gemini-cli PR #518 (merged 2026-05-11, commit 055c24c) does the same in six workflow files. persist-credentials: false does not block access to a GITHUB_TOKEN that is explicitly supplied to the agent step. Updating the package alone does not update copied workflow files, so downstream templates must be refreshed manually. Ostorlab reports no public proof of concept and no reported exploitation as of 2026-12-02, and the CVE is not in the CISA KEV catalog; the absence of known exploitation does not prove credentials remained safe. No IOCs, threat actor or attribution have been published.
MITRE ATT&CK techniques by tactic:
Collection
Execution
Initial Access
T1190 Exploit Public-Facing Application
Credential Access
T1528 Steal Application Access Token; T1552.001 Unsecured Credentials: Credentials In Files
Remediation
Patches
- Update run-gemini-cli to a commit from 2026-05-12 or later
- Update @google/gemini-cli to a release from 2026-05-12 or later (0.71.1 or later per Ostorlab)
- Refresh copied workflow templates, since a package update does not change workflow files
- Add persist-credentials: false to every actions/checkout step (gemini-cli PR 26897, run-gemini-cli PR 518)
Immediate actions
- Search .github/workflows for run-gemini-cli references and identify jobs that process untrusted issue or pull-request text
- Review past runs (gh run list for issue and fork-PR runs) for unexpected commands, unfamiliar outbound network requests and unexplained repository changes by github-actions[bot]
- Rotate GEMINI_API_KEY, GOOGLE_API_KEY, APP_PRIVATE_KEY, GITHUB_TOKEN-adjacent and any other secrets present on runners that executed vulnerable workflows
- Disable legacy automated triage workflows or gate them behind maintainer approval or a maintainer-only label trigger
Workarounds
- Disable the issues and pull_request triggers and run triage only through a maintainer-started workflow_dispatch
- Keep persist-credentials at false and scope GITHUB_TOKEN to contents: read (limits who can supply input but does not fix the vulnerable path)
Longer-term hardening
- Pin GitHub Actions to full commit SHAs rather than @main
- Scope GITHUB_TOKEN to least privilege (for example contents: read)
- Remove run_shell_command access and --yolo from triage jobs and keep the GitHub MCP tool allowlist narrow
- Require maintainer approval before AI agents process outside input
Affected and fixed versions
- Google — run-gemini-cli (google-github-actions/run-gemini-cli GitHub Action)
Vulnerable versions: Commits before 2026-05-12
Fixed in: Commits from 2026-05-12 onward (PR #518 merged 2026-05-11) - Google — Gemini CLI (@google/gemini-cli) and legacy triage, review and issue-fixer workflow templates
Vulnerable versions: Releases and copied workflow templates before 2026-05-12
Fixed in: Releases from 2026-05-12 onward (0.71.1 or later recommended)
Timeline
- Related context: Aikido Security's PromptPwnd research reported prompt injection against AI agents (including Gemini CLI) in GitHub Actions workflows; Google fixed that Gemini CLI issue within four days of disclosure. No CVE was cited, and this is a separate issue from CVE-2026-85259.
- run-gemini-cli PR #518 merged (commit 055c24c), setting persist-credentials: false on checkout steps in six workflow files.
- gemini-cli PR #26897 merged (commit 9fe8643), setting persist-credentials: false on every actions/checkout step across 33 workflow files. This date is the fix cut-off for affected versions.
- Gemini CLI 0.71.1 released; Ostorlab lists it as the latest release and recommends 0.71.1 or later.
- Google published CVE-2026-85259 (GHSA-g6vw-c6rx-j9ph), CWE-78, CVSS v4.0 10.0, covering legacy Gemini CLI triage workflows and run-gemini-cli before 2026-05-12.
- Ostorlab reports no public proof of concept and no known exploitation, and the CVE is not in the CISA KEV catalog. Cyber Security News publishes coverage of the flaw.
Sources cited
- GHSA-g6vw-c6rx-j9ph - GitHub Advisory Database (CVE-2026-85259) GitHub · Advisory · 2026-12-01
- Ostorlab: Gemini CLI GitHub Actions RCE (CVE-2026-85259) blog.ostorlab.co · Research · 2026-12-01
- google-gemini/gemini-cli PR #26897: update checkout action configuration in workflows GitHub · Code repository · 2026-05-12
- google-github-actions/run-gemini-cli PR #518: align checkout steps with standard practices GitHub · Code repository · 2026-05-11
- Critical Gemini CLI Vulnerability Lets Hackers Run Malicious Commands Without Login cybersecuritynews.com · News · 2026-12-02
- Related context: PromptPwnd prompt injection in AI agents in GitHub Actions (Aikido Security) cybersecuritynews.com · News · 2025-12-06
Previous and next in vulnerability
AI-drafted from 6 cited sources; published ; last updated —.