CVE-2026-0755: gemini-mcp-tool vulnerable to OS command injection and @file exfiltration via prompt quoting (CVE-2026-0755)
gemini-mcp-tool 1.1.2 through 1.1.5 passes untrusted prompt text to the Gemini CLI without safe quoting. A prompt can make the CLI read and leak local files such as `~/.ssh/id_rsa`. On Windows, `cmd.exe` metacharacters in the prompt can also run OS commands. Upgrade to 1.1.6.
Published Jun 18, 2026 · Analysis Oct 25, 2026
What an attacker can do
The MCP server launches the Gemini CLI with the caller's prompt through execAsync. ZDI describes it as a user-supplied string used in a system call without validation. Two problems follow.
First, the Gemini CLI treats @path in a prompt as a file reference. A prompt containing @/etc/passwd, @~/.ssh/id_rsa or @../../secret makes the CLI load that file's contents into the request, so an attacker can read and exfiltrate local files.
Second, on Windows the arguments went through cmd.exe without proper quoting. The maintainers say an earlier shell:false double-quote wrapping was broken. Metacharacters could then break out of the argument and run OS commands.
The attacker needs only to get text into the prompt. That can be a direct MCP call, or an AI agent steered by a prompt injection in a web page or document. ZDI rates it CVSS 9.8 with no authentication and code execution as the service account. The advisory's own text confirms file read on all platforms and command injection on Windows. ZDI reported it in July 2025 and published it as a 0-day in January 2026.
Who is affected
npm package gemini-mcp-tool at 1.1.2 up to but not including 1.1.6. The command-injection path applies on Windows. The @file read applies wherever the Gemini CLI runs. Check:
npm ls -g gemini-mcp-toolIf you run it with npx, check the version in your MCP client config.
gemini-mcp-tool
- Ecosystem
- npm
- Affected
- >= 1.1.2, < 1.1.6
- Fixed in
- 1.1.6
- Check
npm ls gemini-mcp-tool
How to fix it
Upgrade to gemini-mcp-tool 1.1.6.
npm install -g [email protected]Version 1.1.6 removes the broken shell:false double-quote wrapping, adds assertSafeFileReferences() to keep @file references inside the working directory, and hardens Windows cmd.exe argument quoting. The advisory lists no workaround. Until you upgrade, do not pass untrusted text into prompts sent to the tool, and restrict who can reach the MCP server.
How to tell if you were hit
Search MCP and agent logs for prompts to the Gemini tool that contain @ followed by a path such as @/etc/, @~/.ssh or @../. On Windows, look for cmd.exe child processes of the MCP server running anything other than the Gemini CLI, with &, | or ^ in the arguments. Check for unexpected reads of SSH keys or dotfiles by the Node process. Beam records agent shell commands, file access and MCP tool calls, and its rules flag risky ones, which would show a prompt-driven file read or command.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Untrusted prompt input could reach the Gemini CLI @file parser, allowing read/exfiltration of arbitrary local files (@/etc/passwd, @~/.ssh/id_rsa, @../../secret). On Windows, unquoted cmd.exe metacharacters could break out into OS command injection.
Fix (1.1.6): removed the broken shell:false double-quote wrapping; added assertSafeFileReferences() to contain @file refs to the working directory; hardened Windows cmd.exe argument quoting.
Questions
- Which versions of gemini-mcp-tool are affected by CVE-2026-0755?
Versions from 1.1.2 up to but not including 1.1.6. The fixed version is 1.1.6.
- Is the command injection only on Windows?
The GitHub advisory ties the OS command injection to unquoted
cmd.exemetacharacters on Windows. The@fileread of local files is not limited to Windows.- Does the attacker need to log in?
No. ZDI lists no authentication required, and the prompt can come from a prompt-injected agent as well as a direct caller.
- Is CVE-2026-0755 exploited in the wild?
No source reports exploitation, and it is not in CISA's KEV catalog. ZDI released the details publicly in January 2026.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77361
obsidian-tc : Symlink read-ACL scope bypass via lexical path checks
medium4.7Oct 23, 2026CVE-2026-114126
Storybook dev server vulnerable to code injection from the local network
high8.7Oct 22, 2026CVE-2026-113731
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
low3.3Oct 21, 2026CVE-2026-114125
Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
critical9.4Oct 21, 2026CVE-2026-111770
MCP TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another
high7.7Oct 20, 2026GHSA-953h-535j-jg2v
agent-router: MCP session resume does not verify the embedded anti-hijacking subject; default Helm seed makes session IDs forgeable
medium6.8Oct 19, 2026
