Gemini CLI Vulnerability Could Have Led to Code Execution, Supply Chain Attack
Gemini CLI vulnerability allowed prompt injection to enable supply chain attacks via GitHub issues.
Summary
A critical CVSS 10/10 vulnerability in Google's Gemini CLI could have allowed attackers to inject malicious prompts into GitHub issues and take over the AI agent designed to auto-triage them. In –yolo mode, the tool ignored allowlists, letting attackers execute arbitrary commands, extract secrets, and pivot to full repository write access for supply chain compromise. Google patched the flaw in version 0.39.1 on April 24, and identified at least eight other vulnerable repositories using the same workflow template.
Full text
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 Ionut Arghire is an international correspondent for SecurityWeek. More from Ionut Arghire Government, Scientific Entities Hit via Daemon Tools Supply Chain AttackOracle Debuts Monthly Critical Security Patch UpdatesCritical Bug Could Expose 300,000 Ollama Deployments to Information TheftCritical, High-Severity Vulnerabilities Patched in Apache MINA, HTTP ServerKarakurt Ransomware Negotiator Sentenced to PrisonMetInfo, Weaver E-cology Vulnerabilities in Attackers’ CrosshairsDigiCert Revokes Certificates After Support Portal HackExploitation of ‘Copy Fail’ Linux Vulnerability Begins Latest News Cisco Patches High-Severity Vulnerabilities in Enterprise ProductsClaude AI Guided Hackers Toward OT Assets During Water Utility IntrusionAutonomous Offensive Security Firm XBOW Raises $35 MillionHerd Security Raises $3 Million for AI-Powered Training PlatformIranian APT Intrusion Masquerades as Chaos Ransomware AttackRomanian Man Extradited to US for Role in Hacking Scheme 17 Years AgoCISA Launches ‘CI Fortify’ to Prepare Critical Infrastructure for Geopolitical Cyber ConflictSophisticated Quasar Linux RAT Targets Software Developers Trending Daily Briefing NewsletterSubscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts. Webinar: ROSI for CPS Security Programs May 13, 2026 In cyber-physical systems (CPS), just one hour of downtime can outweigh an entire annual security budget. Learn how to master the Return on Security Investment (ROSI) to align security goals with the bottom-line priorities. Register Virtual Event: Threat Detection and Incident Response Summit May 20, 2026 Delve into big-picture strategies to reduce attack surfaces, improve patch management, conduct post-incident forensics, and tools and tricks needed in a modern organization. Register People on the MoveRemedio has appointed of Cynthia Stanton as Chief Marketing Officer.Jacki Monson has joined CVS Health as SVP, Deputy CISO.Gigi Schumm has been promoted to Chief Revenue Officer at Securonix.More People On The MoveExpert Insights The Mythos Moment: Enterprises Must Fight Agents with Agents Only with the right platform and an agentic, AI-driven defense, will enterprises be able to protect themselves in the agentic era. (Etay Maor) Why Cybersecurity Must Rethink Defense in the Age of Autonomous Agents From autonomous code generation to decision-making systems that initiate actions without human intervention, the industry is entering a new phase. (Torsten George) Government Can’t Win the Cyber War Without the Private Sector Securing national resilience now depends on faster, deeper partnerships with the private sector. (Steve Durbin) The Hidden ROI of Visibility: Better Decisions, Better Behavior, Better Security Beyond monitoring and compliance, visibility acts as a powerful deterrent, shaping user behavior, improving collaboration, and enabling more accurate, data-driven security decisions. (Joshua Goldfarb) The New Rules of Engagement: Matching Agentic Attack Speed The cybersecurity response to AI-enabled nation-state threats cannot be incremental. It must be architectural. (Nadir Izrael) Flipboard Reddit Whatsapp Whatsapp Email