Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

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

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights.

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Today’s attackers are no longer breaking in — they’re logging in. Join this live webinar as we break down the modern identity attack chain and examine how recent breaches exploited weaknesses in authentication, identity verification, and access management processes.

Register

AI has accelerated both sides of the fight. Adversaries are weaponizing vulnerabilities faster, while defenders are racing to ship detections and configurations. Join this live webinar as we explore how to prove your controls actually hold against new threats, map your security maturity, and unite breach simulation with automated pentesting into a single, coordinated program.

Register

People on the Move

Stephen Garcia has been named Chief Information Security Officer at BreachRx.

Kasper Lindgaard has been appointed Vice President of Security Strategy at CoreView.

Chaim Mazal has been named Chief Information Security Officer at GitLab.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.