Gemini CLI runs hidden commands after reading repository context file

Gemini CLI runs hidden commands after reading repository context file

A one-time approval for a harmless command was treated as approval for further commands supplied by repository text and hidden from the user.

28 July 2025DemonstratedHijacked by content
Gemini CLI (versions before 0.1.14) · Google · Global
What happened
Responsibly disclosed vulnerability demonstrated by researchers; no reported in-the-wild exploitation. Tracebit found, two days after the tool's 25 June 2025 release, that instructions hidden in a repository's README-style context file could steer Gemini CLI. The instructions led the user to allow an innocuous command such as grep; weak parsing of the command string then let additional commands appended to it run under the same approval, including data-transfer commands to a remote server. Whitespace padding hid the appended commands from the terminal display.
Response
Google initially triaged the report as P2/S4, reclassified it as P1/S1 on 23 July, and released a fix in version 0.1.14 on 25 July 2025 (28 days after the report) that makes the additional commands visible and requires approval for additional binaries.
Discovered by
Tracebit researchers; reported to Google on 27 June 2025.
Who was affected
Developers running Gemini CLI on untrusted code repositories
Patterns
Instructions hidden in contentWorked around a safeguardData left the system
Confidence: high · checked 24 September 2026. Published under CC BY 4.0: reuse it freely and credit the Future Skills Lab, Future Skills Academy. Seen an error or a newer development? Write to tellmemore@futureskills.academy.

Related

Incidents with the same pattern

What does this ask of people?

Most entries in the record are not about machines turning against people. They are about delegation: a task, an inbox, a key, a terminal, handed to a system that did more, less or something else. Futures literacy starts with noticing that.

All 177 incidents →The Future Skills Lab