gemini-mcp-tool Vulnerable to OS Command Injection and File Exfiltration (CVE-2026-0755)
A critical vulnerability, CVE-2026-0755, in npm's gemini-mcp-tool package allows for OS command injection on Windows systems due to improper handling of unquoted cmd.exe metacharacters, and arbitrary local file exfiltration via the @file parser when processing untrusted prompt input, leading to potential remote code execution and sensitive data compromise.
A critical vulnerability, tracked as CVE-2026-0755, exists in versions 1.1.2 through 1.1.5 of the npm package gemini-mcp-tool. This flaw allows an attacker to achieve OS command injection on Windows systems by exploiting improper handling of unquoted cmd.exe metacharacters when the tool processes untrusted prompt input. Simultaneously, the tool's @file parser can be abused to read and exfiltrate arbitrary local files from the host system, including sensitive configuration files like /etc/passwd or private keys such as ~/.ssh/id_rsa. The vulnerability stems from insufficient sanitization and quoting of user-supplied prompt data before it is processed by the tool or passed to the underlying operating system. This could lead to full system compromise or extensive data theft, affecting organizations utilizing this specific CLI tool in their development or operational workflows. The issue was addressed in version 1.1.6, which includes hardened Windows cmd.exe argument quoting and restricts @file references to the working directory.
Attack Chain
- Attacker Crafts Malicious Prompt: An attacker creates a specially crafted prompt input containing
cmd.exemetacharacters (e.g.,&,|,&&) for OS command injection or@filereferences (e.g.,@/etc/passwd) for file exfiltration. - User Executes Vulnerable Tool: The
gemini-mcp-tool(versions 1.1.2 to 1.1.5), often run vianode.exeas an npm package, is executed with the attacker-controlled malicious prompt as an argument. - Improper Argument Handling (Windows): On Windows systems, the vulnerable tool processes the prompt without adequately quoting the
cmd.exemetacharacters, leading to them being interpreted as separate commands when passed to the underlying shell. - OS Command Injection: The
gemini-mcp-toolor its child process (e.g.,node.exespawningcmd.exe) executes the injected OS commands, allowing the attacker to run arbitrary commands on the system with the privileges of the tool. - Sensitive File Access (File Exfiltration): Alternatively, if the prompt includes
@filereferences to sensitive paths (e.g.,@C:\Windows\System32\drivers\etc\hostsor@/etc/passwd), thegemini-mcp-tool's internal parser will attempt to read these files from the local filesystem, bypassing intended directory restrictions. - Data Exfiltration / Remote Code Execution: The content of the accessed sensitive files can be retrieved or exfiltrated by the attacker, or the successful command injection grants the attacker remote code execution capabilities, enabling further compromise, persistence, or data theft.
Impact
Successful exploitation of CVE-2026-0755 allows for critical impact, including full system compromise through remote code execution on affected Windows systems. Attackers can execute arbitrary commands, install malware, create new user accounts, or modify system configurations. Furthermore, the ability to exfiltrate arbitrary local files poses a severe risk of sensitive data exposure, including credentials, private keys, intellectual property, and internal system configurations. This could lead to significant financial losses, reputational damage, and regulatory penalties. The nature of the package suggests potential impact across development environments, CI/CD pipelines, or systems where this CLI tool is used for Gemini-related operations.
Recommendation
- Patch CVE-2026-0755 immediately by upgrading
gemini-mcp-toolto version 1.1.6 or higher to address both OS command injection and file exfiltration vulnerabilities. - Enable Sysmon process_creation logging on all Windows endpoints and servers to activate the rules provided in this brief.
- Deploy the Sigma rules in this brief to your SIEM and tune for your environment to detect suspicious command execution patterns involving
node.exeorcmd.exeand attempts to read sensitive files. - Implement strict input validation for any applications or scripts that pass user-controlled input directly to the
gemini-mcp-toolCLI.
Detection coverage 2
Detects CVE-2026-0755 Exploitation - Suspicious Node.js Child Process Execution
highDetects attempts to exploit CVE-2026-0755 via OS command injection, where the gemini-mcp-tool (likely running via node.exe) spawns cmd.exe or powershell.exe with arguments containing shell metacharacters. This indicates potential remote code execution.
Detects CVE-2026-0755 Exploitation - Suspicious @file-like Path Access
mediumDetects potential attempts to exploit CVE-2026-0755 via file exfiltration by monitoring for suspicious access patterns to sensitive system files, especially those referenced with an '@' prefix which could indicate abuse of the gemini-mcp-tool's @file parser.
Detection queries are available on the platform. Get full rules →