CVE-2026-142216: gemini-mcp-tool passes the model parameter straight to Gemini CLI, so a prompt-injected agent can slip in --yolo and auto-approve commands on the host (1.1.8, no fix yet)
gemini-mcp-tool (npm, jamubc/gemini-mcp-tool) is an MCP server that lets Claude Code and other agents hand work to Google's Gemini CLI. Its executeGeminiCLI() puts the tool's model argument on the Gemini CLI command line as given. If an attacker can steer the calling agent, for example with prompt injection in a file or web page, the agent can pass a value like --yolo to ask-gemini or brainstorm. Gemini CLI then auto-approves its own shell commands and file edits on the host. VulnCheck rates it 7.7 and lists 1.1.8, the latest npm release, as affected.
What it is
In src/utils/geminiExecutor.ts (v1.1.8), executeGeminiCLI() builds the argument list with args.push(CLI.FLAGS.MODEL, model). Nothing checks that model is a real model name or that it does not start with --.
Gemini CLI reads --yolo as a flag that auto-approves all tool actions, including shell commands and file writes.
The MCP tools ask-gemini and brainstorm take model as an argument chosen by the calling LLM. An attacker who can get text into that agent's context (a README, issue, web page or tool output) can ask it to call the tool with model set to --yolo and a prompt that runs commands.
CVE-2026-142216 was published on 2 December 2026, credited to Zachariah Mithani (AploSec). The npm package's latest version is still 1.1.8 (last published June 2026), so there is no fixed release yet.
How to check
- Look for gemini-mcp-tool in your MCP client configs (for example claude mcp list, ~/.claude.json, .mcp.json or Cursor's mcp.json).
- Check which agents can call it and whether they read untrusted content such as web pages, issues or third-party repos.
- Check your Gemini CLI settings and logs for runs in auto-approve (YOLO) mode that you did not start.
How to fix
- Remove or disable gemini-mcp-tool until a fixed version is released, or pin it to a fork that only accepts an allowlisted set of model names.
- If you keep it, make the client ask for approval on every ask-gemini and brainstorm call so you can see the model argument.
- Run Gemini CLI in its sandbox, or in a container without your credentials, so an injected --yolo run cannot reach your real files and keys.
grep -rn 'gemini-mcp-tool' ~/.claude.json .mcp.json ~/.cursor/mcp.json 2>/dev/null
npm view gemini-mcp-tool version # 1.1.8 is affected Sources
- criticalCVE-2026-85259: Google's automated Gemini CLI triage workflows (gemini-cli and the run-gemini-cli GitHub Action) could be driven by a crafted GitHub issue to run commands or read secrets (fixed 12 May 2026)
- criticalCVE-2026-12537: Gemini CLI: Remote Code Execution via workspace trust and tool allowlisting bypasses
- highCVE-2026-117558 and seven more: VulnCheck discloses command injection in eight MCP servers and agent tools, from ai-sdlc and sf-mcp to mcp-ffmpeg and an ATXP Gemini CLI extension