Maximum Severity: How Gemini CLI's CVSS 10 Flaw Turned AI Tooling Into a Remote Code Execution Gateway
A CVSS 10.0 flaw in Google's Gemini CLI allowed unauthenticated attackers to hijack AI configuration and execute arbitrary commands on host systems.
This analysis is based on research published by The Hacker News. CypherByte adds analysis, context, and security team recommendations.
Original reporting credit: The Hacker News. CypherByte analysis and threat intelligence layer produced independently by CypherByte.
Executive Summary
A maximum-severity vulnerability — scoring a perfect 10.0 on the CVSS scale — was discovered and subsequently patched in Google's @google/gemini-cli npm package and the associated google-github-actions/run-gemini-cli GitHub Actions workflow. The flaw permitted an unauthenticated, unprivileged external attacker to inject malicious content that the Gemini CLI would load as legitimate configuration, creating a direct pathway to arbitrary remote code execution on the host system. Google has since issued a patch, but the window of exposure — and the architectural lesson buried within it — demands serious attention from any organization that has integrated AI-assisted tooling into their development or CI/CD pipelines.
Security teams responsible for DevSecOps posture, software supply chain integrity, and CI/CD pipeline hardening should treat this as a tier-one priority review item. The vulnerability class is not exotic or novel — it is a configuration injection attack against an AI tooling layer that most organizations have not yet threat-modeled. As AI-native developer tools proliferate across engineering workflows, the attack surface they introduce is expanding faster than the security controls designed to govern them. This research surfaces that gap in stark, quantified terms.
Technical Analysis
At its core, the vulnerability exploited the trust relationship between the Gemini CLI runtime and its configuration loading mechanism. The @google/gemini-cli package, designed to allow developers to invoke Google's Gemini AI models from the command line, supports configuration files that govern model behavior, context boundaries, and operational parameters. The flaw resided in the pipeline's failure to adequately validate or sandbox the source and integrity of configuration content before it was processed and acted upon.
An unprivileged external attacker — requiring no authentication and no elevated access — could force the CLI to load attacker-controlled content as Gemini configuration. In practical terms, this means an adversary could craft a malicious payload and deliver it through any vector that feeds content into the CLI's processing context: a pull request, a repository comment, a crafted issue body, or any other externally reachable surface that interacts with a CI/CD pipeline running the vulnerable google-github-actions/run-gemini-cli action. Once that content was ingested and treated as configuration, the attacker effectively gained the ability to issue instructions that the host system would execute — achieving full remote code execution (RCE) at whatever privilege level the CI runner operated under.
This attack pattern is a variant of what researchers now classify as prompt injection at the infrastructure layer — distinct from user-facing prompt injection attacks against LLM chatbots. Here, the target is not the model's output behavior but the CLI tool's execution environment. The attacker is not trying to manipulate what the AI says; they are manipulating what the system running the AI does. This is a fundamentally more dangerous threat model, because the consequences are system-level rather than output-level.
1. Attacker crafts malicious content designed to be interpreted as Gemini CLI configuration.
2. Content is introduced into a surface readable by the
run-gemini-cli GitHub Action (e.g., PR body, issue, forked repository content).
3. CI pipeline triggers, invoking the vulnerable CLI action against the repository or event context.
4. CLI loads attacker-controlled content as trusted configuration without adequate origin validation.
5. Arbitrary commands execute on the CI runner host at the runner's privilege level.
The use of GitHub Actions as the delivery mechanism amplifies the risk considerably. GitHub Actions workflows that trigger on pull_request_target, issue_comment, or similar events from external contributors are a well-documented source of CI/CD injection risk. Pairing a vulnerable AI CLI action with these high-risk trigger patterns creates a compound vulnerability: the attacker needs only to interact with the repository through a normal, expected mechanism to initiate code execution on the target's infrastructure.
Impact Assessment
Any organization that deployed the @google/gemini-cli npm package or the google-github-actions/run-gemini-cli workflow in a CI/CD context prior to Google's patch should consider their pipeline environment potentially compromised if external contributors had any interaction with the repository during that period. The blast radius is significant: CI runners often carry elevated permissions — repository write access, cloud provider credentials, secrets from environment variables, and deployment keys — meaning successful exploitation could yield lateral movement well beyond the runner itself.
Real-world consequences of successful exploitation include: secrets exfiltration (API keys, cloud credentials, signing certificates stored as CI secrets), supply chain poisoning (injecting malicious code into build artifacts before they are signed and distributed), infrastructure pivot (using cloud credentials accessible to the runner to access production environments), and persistent access (planting backdoors in repositories or downstream artifacts). In the worst-case scenario involving a software vendor's pipeline, a single exploitation event could cascade into a large-scale software supply chain incident affecting end users at scale.
@google/gemini-cli (npm package) — versions prior to patch release. google-github-actions/run-gemini-cli (GitHub Actions workflow) — versions prior to patch release. Any CI/CD pipeline consuming either component with external-contributor-reachable trigger conditions.
CypherByte's Perspective
This vulnerability is a landmark data point in a threat trend that CypherByte has been tracking with increasing urgency: AI tooling is becoming a primary attack surface in the modern development pipeline. For years, security teams have invested heavily in securing the software supply chain at the dependency and package registry level — SBOMs, dependency pinning, artifact signing, and registry integrity checks. What this flaw demonstrates is that AI-native tooling introduces a new layer in that supply chain that currently receives far less scrutiny and operates under a fundamentally different trust model.
Traditional CLI tools process code and configuration authored by known principals within a relatively controlled trust boundary. AI CLI tools, by design, process natural language and context from a far wider range of inputs — repository content, external data sources, user-provided prompts — and then act on that context. The trust boundary is structurally more permeable. Security architects who have not explicitly threat-modeled their AI tooling integrations as a separate attack surface category are operating with a blind spot that adversaries are actively learning to exploit. This will not be the last CVSS 10.0 vulnerability found in an AI developer tool. It is, in our assessment, the beginning of a wave.
Indicators and Detection
Defenders should focus detection efforts on the following signals within CI/CD audit logs, runner telemetry, and GitHub Actions workflow logs:
Behavioral Indicators: Unexpected outbound network connections originating from CI runners during Gemini CLI execution steps. Process execution chains spawning child processes not consistent with normal build activity (e.g., curl, wget, bash, python invoked from the Gemini CLI process tree). Unexpected access to environment variables containing secrets or credential strings during CLI execution. Configuration file loads sourcing content from paths outside the expected project directory structure.
Repository and Workflow Indicators: GitHub Actions workflow runs triggered by pull_request_target or issue_comment events from external, non-collaborator accounts that invoke run-gemini-cli. Unexpected modifications to .gemini/ configuration directories or related dotfiles in PRs from external contributors. Workflow logs showing Gemini CLI loading configuration from sources referencing external URLs or environment-injected paths.
Package Version Indicators: Presence of @google/gemini-cli in package.json or package-lock.json at versions predating the security patch. Reference to unversioned or unpinned google-github-actions/run-gemini-cli in workflow YAML files (e.g., uses: google-github-actions/run-gemini-cli@main without a pinned commit SHA).
Recommendations
1. Patch Immediately. Update @google/gemini-cli to the latest patched version and update any references to google-github-actions/run-gemini-cli in GitHub Actions workflow files to the patched release. Treat this as a zero-tolerance remediation item given the CVSS 10.0 score.
2. Audit Workflow Trigger Conditions. Review all GitHub Actions workflows that invoke Gemini CLI or similar AI tooling for dangerous trigger configurations — specifically pull_request_target and issue_comment events from external contributors. Restrict AI CLI actions to execute only on trusted internal events or validated contributor contexts.
3. Pin Action Versions to Commit SHAs. Replace all floating version references (@main, @latest, @v1) in GitHub Actions workflow files with pinned, immutable commit SHAs. This eliminates the risk of action version substitution attacks and ensures audit reproducibility.
4. Apply Least Privilege to CI Runners. Audit the permissions granted to GitHub Actions runners. Limit secrets exposure to only the jobs that require them using job-level secret scoping. Use short-lived, scoped tokens (e.g., OIDC-based cloud credentials) rather than static, long-lived keys stored as repository secrets.
5. Threat Model AI Tooling Explicitly. Incorporate AI CLI tools, LLM-integrated development assistants, and AI-enabled GitHub Actions into your organization's formal threat model. Apply the same adversarial scrutiny to these tools that you would to any third-party code execution component in your pipeline. Assume that inputs to AI tooling from external sources are untrusted by default.
6. Conduct Retrospective Log Review. If the vulnerable package or action was in use prior to patching, conduct a retrospective review of CI/CD audit logs for the behavioral indicators listed above. Consider this a potential incident response precursor action, particularly if your pipelines were publicly reachable by external contributors during the exposure window.
How this article was produced
This analysis was produced by CypherByte's automated research pipeline, starting from the published summary of the original report credited below. Articles are published automatically. It can include context and recommendations that are not in the original report, so read the original for the researchers' own findings.
Sources
Spotted an error? Tell us on X (@cypherbyteio) with this page's address so we can fix it.
CypherByte Premium is coming soon, with deep-dive writeups and a weekly threat briefing. Join the waitlist for founding member pricing.