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.
- 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
- Sources
- Code Execution Through Deception: Gemini AI CLI HijackTracebit, 28 Jul 2025
- Researchers flag flaw in Google's AI coding assistant that allowed for 'silent' code exfiltrationCyberScoop, 28 Jul 2025
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.