Google's Gemini CLI agent could run malicious code silently

By

Command line AI tool lasts one month before serious vulnerability is found.

The recently introduced Google Gemini CLI agent, which provides a text based command interface to the company's artificial intelligence large language model, could be tricked into silently executing malicious commands, a security researcher has discovered.

Google's Gemini CLI agent could run malicious code silently

Tracebit security researcher Sam Cox discovered the vulnerability, which "through a toxic combination of improper validation, prompt injection and misleading UX, inspecting untrusted code consistently leads to silent execution of malicious commands."

By hiding a prompt injection in a README.md file which contained the full text of the GNU Public Licence as well, to accompany a benign Python script that the target could be likely to run, Cox was able to coax Gemini into exfiltrating credentials using the "env" and "curl" commands to a listening remote server.

Google initally triaged the vulnerability Cox found as Priority 2, Severity 4, in its Bug Hunters program after Cox reported it on June 27.

About three weeks later, Google reclassified the vulnerability as the most serious Priority 1, Severity 1 which requires urgent, immediate attention as it could lead to significant data compromise, unauthorised access and/or code execution.

Users are advised to upgrade to Gemini 0.1.14 which has safeguards for shell code execution and mitigate the above attack.

Enabling "sandboxing", which is an isolated environment that protects users' systems, would also prevent the attack Cox discovered.

However, after installation Gemini CLI by default runs without sandboxing, although the tool prominently warns users that this is the case.

Got a news tip for our journalists? Share it with us anonymously here.
Copyright © iTnews.com.au . All rights reserved.
Tags:

Most Read Articles

Microsoft knew of SharePoint security flaw in May, initial patch ineffective

Microsoft knew of SharePoint security flaw in May, initial patch ineffective

"PoisonSeed" attack does not bypass hardware MFA

"PoisonSeed" attack does not bypass hardware MFA

Allianz Life says majority of US customers' data stolen in hack

Allianz Life says majority of US customers' data stolen in hack

NT gov agency targeted in alleged $3.5m BEC scam

NT gov agency targeted in alleged $3.5m BEC scam

Log In

  |  Forgot your password?