Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Artificial Intelligence

Critical Gemini CLI Flaw Enabled Host Code Execution, Supply Chain Attacks

An attacker could have planted a malicious configuration to execute commands outside the sandbox.

Gemini

A critical remote code execution vulnerability was recently discovered by researchers in Gemini CLI, an open source AI agent designed to provide lightweight access to Gemini directly from a terminal.

The vulnerability, patched by Google in both Gemini CLI and the ‘run-gemini-cli’ GitHub Action, was identified by researchers at Novee Security.

The researchers noticed that “Gemini CLI automatically trusted the current workspace folder, loading any agent configuration it found there without review, sandboxing, or human approval.”

An attacker who could plant a malicious configuration in that folder could cause the AI agent to execute arbitrary commands on the host before sandbox initialization.

“Across every affected workflow, the impact was the same: code execution on the host running the agent gave an unprivileged outsider access to whatever secrets, credentials, and source code the workflow could reach,” Novee researchers explained.

According to the researchers, a threat actor could have exploited the vulnerability to steal tokens and gain lateral movement to downstream systems. 

Advertisement. Scroll to continue reading.

In the context of a CI/CD pipeline, the attacker could have leveraged the vulnerability to carry out a supply chain attack.

Novee researchers noted:

“AI coding agents now sit inside CI/CD pipelines holding the execution privileges of a trusted contributor, reading from the same workspaces a contributor would touch. This level of access can lead to critical supply-chain attacks, the type that stem from the developer workflow itself.”

The attack did not involve any prompt injection or model decision.

A different team of researchers recently demonstrated that AI agents associated with Claude Code Security Review, Gemini CLI Action, and GitHub Copilot Agent could be hijacked via malicious GitHub comments.

Related: Critical GitHub Vulnerability Exposed Millions of Repositories

Related: Google Antigravity in Crosshairs of Security Researchers, Cybercriminals

Related: Checkmarx Confirms Data Stolen in Supply Chain Attack

Related: Bitwarden NPM Package Hit in Supply Chain Attack

Written By

Eduard Kovacs (@EduardKovacs) is senior managing editor at SecurityWeek. He worked as a high school IT teacher before starting a career in journalism in 2011. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

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.