Skip to main content
Mallory
← Back to News
build-pipeline-compromiseai-platform-securitywidely-deployed-product-advisorypatch-regression

Google Patches CVSS 10.0 RCE in Gemini CLI Headless Mode

Supply Chain Risk · 4 sources · Updated 5mo ago · First seen May 1, 2026

Google Patches CVSS 10.0 RCE in Gemini CLI Headless Mode

Google has patched a maximum-severity remote code execution flaw in Gemini CLI that affected headless deployments, especially GitHub Actions and other CI/CD workflows. The vulnerability stemmed from overly permissive workspace trust handling that automatically treated active folders as trusted and could load attacker-controlled configuration files and environment variables from local .gemini directories. The issue was independently discovered by Elad Meged of Novee and Dan Lisichkin of Pillar Security, and researchers warned that successful exploitation could expose secrets, credentials, source code, and connected downstream systems.

Google said the issue is addressed in Gemini CLI versions 0.39.1 and 0.40.0-preview.3, but warned that applying the fix may require additional workflow changes to avoid breaking automation. The run-gemini-cli GitHub Action defaults to the latest release, which can disrupt pipelines that depended on the previous implicit trust behavior, while workflows using --yolo mode may fail silently unless tool allowlists are updated to align with the new policy engine. Google is urging organizations to review CI/CD jobs and move to explicit trust settings and compatible allowlists before resuming automated use.

Why it matters

Impact assessment

This vulnerability affects organizations using Gemini CLI in headless mode, especially GitHub Actions and other CI/CD workflows that process untrusted content such as pull requests or public issues. Impact is severe because successful exploitation can enable host-level remote code execution, theft of CI secrets and credentials, source code exposure, build artifact tampering, and downstream supply-chain compromise.

Exposure is concentrated in automated development pipelines rather than general end users, but the affected use case is common in modern software engineering environments. The reporting describes proof-of-concept exploitation and full attack-chain demonstrations by researchers; the provided references do not confirm active in-the-wild abuse.

Supporting facts

  • Affected products:
    • @google/gemini-cli before 0.39.1 and 0.40.0-preview.3
    • google-github-actions/run-gemini-cli before 0.1.22
  • Most exposed environments:
    • GitHub Actions
    • Headless Gemini CLI deployments
    • CI/CD workflows handling untrusted pull requests, issues, or repository content
  • Business impact described:
    • Secret and credential theft from CI pipelines
    • Source code exposure
    • Build artifact modification
    • Repository takeover risk
    • Supply-chain compromise and pivoting to downstream systems
  • Severity:
    • CVE-2026-12537
    • CVSS 10.0 / maximum severity
  • Exploitation status:
    • Researchers from Novee and Pillar Security independently discovered the issue
    • Pillar Security demonstrated a full attack chain against gemini-cli
    • No confirmed in-the-wild exploitation stated in the references
Does this reach your builds?Trace attribution and downstream blast radius.
Trace the chain
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Apr 16, 2026 – Jun 29, 2026
  1. Jun 29, 20265mo ago

    Google patches affected run-gemini-cli GitHub Action versions

    The newly disclosed advisory states that the related google-github-actions/run-gemini-cli package was also affected and that versions earlier than 0.1.22 are vulnerable. The notice ties the issue to CVE-2026-12537 and recommends upgrading and reviewing CI/CD workflows that process untrusted input.

    Critical Gemini CLI Vulnerability Let Attackers Execute Arbitrary Code
  2. May 1, 20267mo ago

    Google warns patched Gemini CLI may still require workflow changes

    Google said organizations using Gemini CLI via GitHub Actions or in headless CI/CD environments may need to take additional steps after patching to avoid breaking automated pipelines. It specifically warned that run-gemini-cli defaults to the latest release and that workflows using --yolo mode may fail unless tool allowlists are updated for the new policy engine behavior.

  3. Apr 30, 20267mo ago

    Google releases fixes in Gemini CLI 0.39.1 and 0.40.0-preview.3

    Google addressed the vulnerability in Gemini CLI versions 0.39.1 and 0.40.0-preview.3. The fix changed trust handling and policy behavior for headless mode, especially affecting CI/CD and GitHub Actions use cases.

  4. Apr 30, 20267mo ago

    Researchers independently discover Gemini CLI headless-mode RCE flaw

    Elad Meged of Novee and Dan Lisichkin of Pillar Security independently identified a maximum-severity remote code execution vulnerability in Gemini CLI. The issue involved headless mode automatically trusting workspace folders and loading attacker-controlled configuration and environment data from local .gemini directories.

  5. Apr 16, 20268mo ago

    Pillar Security privately reports Gemini CLI issue to Google

    Pillar Security reported the vulnerability to Google in the google/draco repository, beginning the coordinated disclosure process. The report described how Gemini CLI running in automated '--yolo' workflows could be abused via prompt injection to access local GitHub credentials and enable repository compromise.

    Google Fixes CVSS 10 Gemini CLI Vulnerability Enabling GitHub Issue-Based RCE
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Affected products

1 linked
Gemini-Cli

Organizations

1 linked
Google
Do you run this?See attribution and downstream blast radius, and whether this package or vendor reaches your builds.
Trace the Supply Chain
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.