Artificial Intelligence

Gemini CLI Vulnerability Could Have Led to Code Execution, Supply Chain Attack

Attackers could inject prompts into a GitHub issue and take over the AI agent designed to automatically triage the issue.

Gemini

A critical vulnerability in Gemini CLI could have allowed attackers to mount a supply chain attack via indirect prompts injected into a GitHub issue, Pillar Security warns.

Gemini CLI is the open source AI agent that provides access to Google’s Gemini AI assistant directly from a terminal.

The security defect, assigned a CVSS score of 10/10 but no CVE identifier, existed because Gemini CLI in –yolo mode would ignore tool allowlists, leading to the execution of any command.

According to Pillar Security, an attacker could have exploited the flaw by creating a public issue on a Google GitHub repository and hiding malicious prompts in its text.

Because in –yolo mode all tool calls are automatically approved, the attacker could take over the AI agent designed to automatically triage the user-submitted GitHub issue.

Based on the injected instructions, the agent could extract internal secrets from the build environment and send them to an attacker-controlled server.

Advertisement. Scroll to continue reading.

“From those credentials, the attacker pivots to a token with full write access on the repository. Full supply-chain compromise. The attacker can push arbitrary code to the main branch of gemini-cli’s repository, which then ships to every downstream user,” Pillar notes.

At least eight other Google repositories had the same vulnerable workflow template deployed, the cybersecurity firm says.

Google addressed the vulnerability on April 24, in Gemini CLI version 0.39.1, which evaluates tool allowlisting under –yolo mode. The run-gemini-cli GitHub Action was also updated.

In addition to the tool allowlisting issue, the update also resolved a lax trust issue impacting Gemini CLI in headless mode, which automatically trusted the current workspace folder, loading any configuration or environment variable in it.

This could have allowed attackers to access credentials, secrets, and source code across vulnerable CI workflows, potentially leading to supply chain attacks.

Related: Claude Code, Gemini CLI, GitHub Copilot Agents Vulnerable to Prompt Injection via Comments

Related: Critical GitHub Vulnerability Exposed Millions of Repositories

Related: Google Antigravity in Crosshairs of Security Researchers, Cybercriminals

Related: OpenAI Widens Access to Cybersecurity Model After Anthropic’s Mythos Reveal

Related Content

Vulnerabilities

The flaws allow remote, unauthenticated attackers to make system changes, access underlying accounts, and inject commands.

Artificial Intelligence

Context is the central plank of AI in general, and agentic AI in particular. If an AI system doesn’t have the correct context, it...

Application Security

The security defects allow unauthenticated users to take control of the open source software supply chain.

Artificial Intelligence

Named EmberAI, the new capability is built on Dragos’ massive operational technology cybersecurity dataset.

Artificial Intelligence

Attackers could abuse Dify's multi-tenant cloud service to read private chats, preview other tenants' documents, and reach internal APIs.

Vulnerabilities

Attackers can send crafted media files to execute code in any application that uses FFmpeg’s libavcodec library.

Artificial Intelligence

OpenAI has expanded its Daybreak cybersecurity initiative with a new suite of tools and partnerships.

Data Protection

Squidbleed, discovered with the aid of Claude Mythos Preview, has been described as a Heartbleed-style vulnerability. 

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version