Flaw in Gemini CLI coding tool could allow hackers to run nasty commands

30 July 2025

Upgrade to Custom Cursor Pro for exclusive features!

Beware of coding agents that can access your command window.

Researchers needed less than 48 hours with Google’s new Gemini CLI coding agent to devise an exploit that made a default configuration of the tool surreptitiously exfiltrate sensitive data to an attacker-controlled server.

Gemini CLI is a free, open-source AI tool that works in the terminal environment to help developers write code. It plugs into Gemini 2.5 Pro, Google’s most advanced model for coding and simulated reasoning. Gemini CLI is similar to Gemini Code Assist except that it creates or modifies code inside a terminal window instead of a text editor. As Ars Senior Technology Reporter Ryan Whitwam put it last month, “It's essentially vibe coding from the command line.”

Gemini, silently nuke my hard drive

Our report was published on June 25, the day Google debuted the tool. By June 27, researchers at security firm Tracebit had devised an attack that overrode built-in security controls that are designed to prevent the execution of harmful commands. The exploit required only that the user (1) instruct Gemini CLI to describe a package of code created by the attacker and (2) add a benign command to an allow list.

The malicious code package looked no different than millions of others available in repositories such as NPM, PyPI, or GitHub, which regularly host malicious code uploaded by threat actors in supply-chain attacks. The code itself in the package was completely benign. The only trace of malice was a handful of natural-language sentences buried in a README.md file, which like all such files was included in the code package to provide basic information about its purpose, scope, and requirements.

That was the perfect place for the researchers to hide a prompt-injection, a class of AI attack that has emerged as the biggest single threat confronting the safety and security of AI chatbots. Developers frequently skim these files at most, decreasing the chances they’d notice the injection. Meanwhile, Gemini CLI could be expected to carefully read and digest the file in full.

Discover our latest cursor collections and enhance your browsing today!
Advertisement: Try Custom Cursor Pro now!

Our Products

Cursor Helper - Custom Cursors

Cursor Helper - Custom Cursors

Maximize productivity with Cursor Helper: a refined extension that not only customizes your pointer’s look but streamlines your daily workflow with intuitive options.

View Product
Cookie Clicker - Idle Browser Simulation

Cookie Clicker - Idle Browser Simulation

Engage millions in addictive baking fun - Cookie Clicker ramps up user retention with layered upgrades and strategic progression in an idle format.

View Product
Minesweeper for Chrome - Logic Puzzle

Minesweeper for Chrome - Logic Puzzle

Revitalize a classic with Minesweeper for Chrome - an engaging logic puzzle that enhances site interaction and encourages multiple playthroughs.

View Product
Custom Cursor Trail - Interactive Effects

Custom Cursor Trail - Interactive Effects

Stand out with Custom Cursor Trail - a Chrome extension that traces your pointer in vivid effects to captivate visitors and boost brand recall.

View Product
Custom Cursor Trail - Custom Cursor Helper

Custom Cursor Trail - Custom Cursor Helper

Leave a lasting impression - Cursor Trail paints your path in luminous strokes, marrying dynamic motion with elegant design for every movement.

View Product
Cursor Space for Google Chrome

Cursor Space for Google Chrome

Transform your browser into a cosmic playground - Cursor Space introduces galaxy-inspired pointers that add immersive flair without sacrificing speed or usability.

View Product
Cursor Cat - Animated Pointer Companion

Cursor Cat - Animated Pointer Companion

Delight users with Cursor Cat - a playful Chrome extension that adds a charming feline sidekick to every cursor move, boosting UX and shareability.

View Product
Custom Cursor - Texture Cursors

Custom Cursor - Texture Cursors

Experience tactile depth in the digital realm - Texture Cursors offers a curated set of lifelike pointer textures, elevating both clarity and creativity.

View Product
Cursor Trails - Custom Cursor Trails

Cursor Trails - Custom Cursor Trails

Enrich each click with graceful motion - Cursor Trails offers a refined collection of animated effects to elevate both style and usability.

View Product
Pawsome Browser Kitties - Cursor Animation

Pawsome Browser Kitties - Cursor Animation

Increase dwell time with Pawsome Kitties - animated kitten avatars that follow your pointer, enhancing site stickiness and user delight.

View Product
Custom Cursor Pro - Custom Cursor

Custom Cursor Pro - Custom Cursor

Elevate your Chrome experience with Custom Cursor Pro: a premium suite of handcrafted cursors engineered for performance, style, and seamless integration.

View Product
Custom Cursor - Mouse Cursor

Custom Cursor - Mouse Cursor

Rediscover the classic pointer - Mouse Cursor redefines simplicity with a selection of minimalist, high-contrast cursors optimized for every task.

View Product
PiggyBank Money Clicker - Idle Cash Game

PiggyBank Money Clicker - Idle Cash Game

Boost engagement with PiggyBank Money Clicker - a browser idle game where every click yields virtual cash, driving session length and repeat visits.

View Product
Custom Cursor Changer

Custom Cursor Changer

Inject personality into your pointer - Custom Cursor Changer lets you switch between dozens of vibrant designs in a single click, boosting engagement and fun.

View Product
BridgeMaster - Stick Hero Arcade Game

BridgeMaster - Stick Hero Arcade Game

Extend session lengths with BridgeMaster - a physics-driven arcade game where precision and timing unlock new levels of user engagement.

View Product
Money Rain - Visual Currency Extension

Money Rain - Visual Currency Extension

Capture attention with Money Rain - a Chrome extension that showers your screen in dynamic money graphics, perfect for viral sharing and brand visibility.

View Product
Custom Cursor App - Custom Cursor

Custom Cursor App - Custom Cursor

Discover a versatile cursor toolkit - Custom Cursor App delivers an expansive library of high-resolution pointers that blend flawless aesthetics with lightning-fast performance.

View Product
Catch the Cat - Reflex Challenge

Catch the Cat - Reflex Challenge

Drive repeat sessions with Catch the Cat - a fast-paced browser game that tests reflexes and strategic thinking in bite-sized play periods.

View Product