# 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. Google published the CVE on 2026-12-01; no public PoC, known exploitation or CISA KEV listing as of 2026-12-02.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-02T14:52:47Z
- **Last updated:** 2026-12-02T14:52:47Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7287
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7287.png
- **ID:** TL-2026-7287
- **Severity:** CRITICAL (CVSS 10)
- **Category:** VULNERABILITY
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 10
- **CVEs:** CVE-2026-85259

## Description

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

- T1190 Exploit Public-Facing Application
- T1059.004 Unix Shell
- T1552.001 Unsecured Credentials: Credentials In Files
- T1528 Steal Application Access Token
- T1005 Data from Local System

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**CVE-2026-85259 Gemini CLI Agent Spawning Shell with Execution/Staging Primitives - Exploitation** (`TL-2026-7287-SPL-001`)

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

````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 commands
````

### Microsoft KQL

```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 desc
```

### Sigma

```yaml
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: high
```

**Known 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.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- CVE-2026-85259 Gemini CLI Launched with --yolo Spawning Shell - Exploitation Surface (locked: unlock with TL Creds)
- CVE-2026-85259 Gemini CLI Agent Shell Reading Persisted Git Checkout Credentials - Post-Exploitation (locked: unlock with TL Creds)
- CVE-2026-85259 github-actions[bot] Repository Content or Protection Changes - Token Abuse / Supply Chain (locked: unlock with TL Creds)
- CVE-2026-85259 Legacy Gemini Template Shell Processor Echoing ISSUE_TITLE / ISSUE_BODY - Exploitation Surface (locked: unlock with TL Creds)
- CVE-2026-85259 Gemini CLI Agent Process Reading Credential Files - Post-Exploitation (locked: unlock with TL Creds)
- CVE-2026-85259 Gemini CLI Agent Shell Making Outbound curl/wget to Non-Allowlisted Destinations - C2 / Exfiltration (locked: unlock with TL Creds)
- CVE-2026-85259 Gemini CLI Agent Shell Harvesting Environment Secrets (GITHUB_TOKEN / GEMINI_API_KEY / OIDC) - Post-Exploitation (locked: unlock with TL Creds)
- CVE-2026-85259 github-actions[bot] Changing Secrets, Webhooks or Deploy Keys - Token Abuse / Persistence (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [GHSA-g6vw-c6rx-j9ph - GitHub Advisory Database (CVE-2026-85259)](https://github.com/advisories/GHSA-g6vw-c6rx-j9ph)
- [Ostorlab: Gemini CLI GitHub Actions RCE (CVE-2026-85259)](https://blog.ostorlab.co/gemini-cli-github-actions-rce-cve-2026-85259.html)
- [google-gemini/gemini-cli PR #26897: update checkout action configuration in workflows](https://github.com/google-gemini/gemini-cli/pull/26897)
- [google-github-actions/run-gemini-cli PR #518: align checkout steps with standard practices](https://github.com/google-github-actions/run-gemini-cli/pull/518)
- [Critical Gemini CLI Vulnerability Lets Hackers Run Malicious Commands Without Login](https://cybersecuritynews.com/gemini-cli-security-flaw/)
- [Related context: PromptPwnd prompt injection in AI agents in GitHub Actions (Aikido Security)](https://cybersecuritynews.com/gemini-cli-prompt-injections-github)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7287
