Rogue Agents Watch › Records › gemini-cli-ci-untrusted-workspace-rce

Gemini CLI auto-trusted untrusted CI workspaces, creating a remote-code-execution risk

Disclosed · added to the index · last updated

Grades

Verification status
Confirmed — Confirmed by a first-party disclosure or multiple independent credible sources.
Sourcing confidence
Primary — Backed by primary sourcing — first-party disclosure, vendor incident report, government advisory, or court documents.
AI role
Significant — AI materially enabled or accelerated the operation, but was one of several important components.
Severity
Critical — Broad real-world harm — e.g. many organizations compromised, large-scale exfiltration, or critical-infrastructure impact.

Summary

A GitHub security advisory (GHSA-wpqr-6v78-jr5g), published 2026-04-24, documents that Gemini CLI and the run-gemini-cli GitHub Action, in headless or CI mode, previously trusted workspace folders automatically, so untrusted content such as pull requests from outside contributors could lead to remote code execution; a permissive mode also ignored the tool allowlist, letting prompt injection on untrusted input lead to arbitrary command execution. The advisory is rated critical (CVSS 10.0). Fixed versions require explicit folder trust in headless mode. Affected versions are the Gemini CLI below 0.39.1 and below 0.40.0-preview.3 and run-gemini-cli below 0.1.22; the fixes are 0.39.1 and 0.40.0-preview.3 for the CLI and 0.1.22 for the Action. Credited to researchers at Novee Security and Pillar Security.

Impact as stated

Per the GitHub advisory: untrusted CI workspace content could lead to remote code execution through automatic folder trust, and a permissive mode ignoring the tool allowlist could let prompt injection reach arbitrary command execution. Rated CVSS 10.0; fixed in the listed versions.

Facts as stated by sources

Actor
Novee Security and Pillar Security researchers (coordinated disclosure) (Researcher)
Category
Agent hijack / prompt injection
Models named
Gemini CLI
Model families
Gemini (Google)
Agentic autonomy level
Not applicable
Guardrail bypass
Indirect prompt injection
Attack lifecycle phases
Execution
Target sectors
Technology
Target countries
not stated
Organisations affected
not stated
Records exfiltrated
not stated

Framework mappings

MITRE ATLAS
AML.T0051.001, AML.T0053, AML.T0119
CVE
CVE-2026-12537

Mitigations as stated

  • Upgrade to Gemini CLI 0.39.1 or 0.40.0-preview.3 and run-gemini-cli 0.1.22; headless mode now requires explicit folder trust. Treat untrusted workspace content as attacker-controlled in CI.

Map

No cited source states a location; this record is listed beside the map, never plotted.

Related records

Sources (1; single publisher, no independent corroboration recorded)

  1. Update to Gemini CLI and run-gemini-cli Trust Model (GHSA-wpqr-6v78-jr5g)
    GitHub Security Advisory (run-gemini-cli maintainers) · First-party disclosure · · archived copy

Cite this record

Agentic Attack Index (MLSecOpsHub), dataset v0.9.0, record "gemini-cli-ci-untrusted-workspace-rce". https://raw.githubusercontent.com/MLSecOpsHub/agentic-attack-index/v0.9.0/dist/incidents/gemini-cli-ci-untrusted-workspace-rce.json — CC BY-SA 4.0.

Record JSON · Source YAML · Report a correction