Argument injection flaw in gemini-mcp-tool enables auto-approve mode
A disclosed flaw lets attackers smuggle Gemini CLI flags such as --yolo through a tool's model parameter, turning off approval prompts for host commands.
By The Agentic Times ·

A vulnerability disclosed on 2 December 2026 affects gemini-mcp-tool, an open-source connector that lets AI agents call the Gemini command-line tool. According to the National Vulnerability Database entry for CVE-2026-142216, every version of the tool up to and including 1.1.8 contains an argument injection flaw that can be used to switch on an auto-approve mode for running commands and changing files on the host machine.
The problem sits in a function called executeGeminiCLI(). According to the advisory, an attacker who controls the arguments passed to the MCP tool can inject extra Gemini CLI options through the model parameter. The model parameter is meant to name which model to use. Instead, the advisory says, its contents are passed through in a way that the command line treats as additional flags.
MCP, the Model Context Protocol, is the interface that lets an AI agent discover and call external tools. In this case the relevant tools are named ask-gemini and brainstorm. The NVD entry states that attackers can prompt-inject the calling LLM agent to pass values such as --yolo to either of those tools. Prompt injection means hiding instructions in content the agent reads, so the agent follows the attacker's wishes rather than the user's. The effect of the --yolo flag, according to the advisory, is to enable auto-approve mode, which in turn permits host command execution and file modification.
That chain matters because approval prompts are often the last control standing between an agent and a user's machine. A human in the loop is supposed to see a proposed shell command before it runs. If a flag injected through a model name quietly removes that step, the agent can act without a confirmation being shown. The advisory does not describe any mitigations or a fixed version, and the record lists the status of the issue as reported.
The NVD entry references two items. One is a link to the geminiExecutor.ts source file in the project's GitHub repository at tag v1.1.8, pointing at a specific block of lines where the executor builds its command. The other is an advisory published by VulnCheck, titled for argument injection via the model parameter in gemini-mcp-tool through 1.1.8. No exploitation in the wild is described in the sources, and no affected users are named.
The pattern here is a familiar one for anyone deploying agent tooling. The tool authors appear to have treated the model parameter as a low-risk string, because a model name looks like a label rather than an instruction. Once that string reaches a command line, the distinction disappears. Anything that starts with two dashes becomes a switch. Argument injection is the command-line cousin of SQL injection, and the defence is similar: validate the value against a list of permitted options rather than passing user or agent-supplied text through to a process invocation.
The second lesson concerns trust boundaries. The agent calling the tool is not a trusted party if any of the text it processes can come from outside. Documents, web pages, issue trackers and emails can all carry injected instructions. Any parameter an agent fills in should be treated as attacker-controlled. Teams running gemini-mcp-tool should check which version they have deployed and review the referenced advisory for details.
Sources
- nvd.nist.govhttps://nvd.nist.gov/vuln/detail/CVE-2026-142216
