CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-0755

CVE-2026-0755: Remote Code Execution and Arbitrary File Exfiltration in gemini-mcp-tool

Alon Barad
Alon Barad
Software Engineer

Jun 19, 2026·7 min read·2 visits

Executive Summary (TL;DR)

An unauthenticated remote code execution vulnerability on Windows and a cross-platform file exfiltration flaw in gemini-mcp-tool <= 1.1.5 allow attackers to execute arbitrary system commands or read sensitive local files via manipulated prompt inputs.

CVE-2026-0755 is a critical vulnerability in gemini-mcp-tool (<= 1.1.5) that allows unauthenticated remote code execution on Windows installations and arbitrary local file exfiltration across all supported operating systems. The flaws exist within the execAsync command runner and the input handling logic of the Model Context Protocol (MCP) server, which fails to securely escape arguments passed to Node.js child processes and does not validate local file references in user-supplied prompt strings.

Vulnerability Overview

The open-source gemini-mcp-tool is designed to connect Google Gemini command line utilities to Model Context Protocol (MCP) compatible clients, such as Claude Desktop or Claude Code. Because this tool handles natural language inputs directly from LLM agents or user-supplied prompts, its command execution interfaces represent a high-exposure attack surface.

The vulnerability, cataloged as CVE-2026-0755, presents two distinct security issues that allow unauthenticated remote attackers to perform actions within the security context of the server process. On Windows systems, inadequate validation of command arguments allows for Remote Code Execution (RCE) via system command injection. On macOS and Linux systems, the tool fails to prevent local file references, allowing an attacker to exfiltrate private files from the host platform.

Because the MCP server handles inputs programmatically forwarded from local or remote AI models, exploitation can occur without direct user interaction if an attacker is able to influence the model context. Both issues stem from failures in input parsing and process execution configurations within the application code.

Root Cause Analysis

The root cause of the Windows-specific command injection lies in the interaction between Node.js and the underlying command interpreter. Node.js applications running on Windows frequently execute .cmd or .bat shims. Starting with Node.js 22, executing these batch files requires setting the option shell: true to prevent execution failures.

When shell: true is configured, Node.js delegates command parsing to cmd.exe /d /s /c. Under this mode, arguments are joined into a single command line string and re-parsed. In gemini-mcp-tool version 1.1.5 and below, argument sanitization relied on the regex /[\s"]/.test(s) to determine if an argument needed to be enclosed in double quotes. This logic failed to account for command separators such as &, |, <, and > when they were supplied without adjacent spaces or double quotes. Consequently, a string like a&calc was passed to cmd.exe completely unquoted, leading to command separation and execution of the subsequent payload.

The second vector, targeting local files, is rooted in the Gemini CLI's native support for inlining files using the @ prefix. The application attempted to prevent this by wrapping prompt inputs in double quotes when an @ character was detected. However, because Unix-like environments execute commands via execve (with shell: false by default), Node.js passed the literal double-quote characters directly to the binary as part of the argument. The Gemini CLI ignored the outer quotes and parsed the path anyway, bypassing the intended security validation.

Code Analysis and Patch Verification

The vulnerable code in src/utils/commandExecutor.ts relied on a naive regular expression to determine if a command-line argument required escaping. The mapping function left arguments containing critical shell characters untouched if they did not contain a space or double quote.

// Vulnerable code in gemini-mcp-tool <= 1.1.5
const isWindows = process.platform === "win32";
const safeArgs = isWindows
  ? args.map(a => {
      const s = String(a);
      return /[\s"]/.test(s) ? `"${s.replace(/"/g, '""')}"` : s;
    })
  : args;

The patch introduced in version 1.1.6 implements a rigorous quoting mechanism named quoteForCmd which is applied unconditionally to every argument on Windows platforms. This function escapes pre-existing quotes and backslashes using CommandLineToArgvW rules, rendering active shell characters completely inert.

// Patched code in gemini-mcp-tool >= 1.1.6
function quoteForCmd(arg: string): string {
  const body = String(arg).replace(/(\\*)"/g, '$1$1""').replace(/(\\+)$/, '$1$1');
  return `"${body}"`;
}
 
const isWindows = process.platform === "win32";
const safeArgs = isWindows ? args.map(quoteForCmd) : args;

To address the file exfiltration vulnerability, the developer deleted the literal quote-wrapping logic and implemented an explicit verification function, assertSafeFileReferences, which validates all file-reference patterns against the current working directory.

// Patched path validation in gemini-mcp-tool >= 1.1.6
import * as path from 'path';
const FILE_REF_PATTERN = /@(\S+)/g;
 
export function assertSafeFileReferences(prompt: string, root: string = process.cwd()): void {
  const normalizedRoot = path.resolve(root);
  for (const match of prompt.matchAll(FILE_REF_PATTERN)) {
    const ref = match[1];
    const resolved = path.resolve(normalizedRoot, ref);
    const escapesRoot = resolved !== normalizedRoot && !resolved.startsWith(normalizedRoot + path.sep);
    if (ref.startsWith('~') || escapesRoot) {
      throw new Error(`Refusing @file reference outside the project directory: "@${ref}"`);
    }
  } 
}

This verification ensures that any path resolving outside the specified project root directory, or referencing the home directory via ~, triggers an immediate error and prevents the downstream command execution.

Exploitation Methodology and Attack Scenarios

An attacker can exploit the command injection vulnerability by submitting a malicious payload via the MCP interface to functions like ask-gemini. On Windows systems, inputting a prompt such as a&powershell.exe -e <base64> bypasses the character filter because it lacks spaces or double quotes. When Node.js spawns the subprocess, cmd.exe interprets the unquoted ampersand as a command separator, initiating execution of the secondary command.

On Unix-like platforms, an attacker can leverage the @ prefix to read local system configuration files or credential databases. Submitting a prompt such as Summarize: @/etc/passwd to the MCP server triggers this behavior. The application fails to block the file reference because Unix executions use shell: false, passing the input string directly to the Gemini binary.

The Gemini binary opens the specified file and inserts its contents directly into the prompt payload. The Large Language Model (LLM) processes the updated context and returns the contents of /etc/passwd in its response back to the user, effectively exfiltrating sensitive operating system details.

Impact Assessment

The impact of CVE-2026-0755 is critical because MCP servers typically run in the security context of the active user session or a dedicated service account. An attacker who successfully achieves remote command execution can read, modify, or delete files, install malicious software, or pivoting to other resources on the local network.

If the server is deployed on a developer's workstation to assist with programming tasks, execution of arbitrary commands could expose proprietary code bases, private SSH keys, API access tokens, and browser session cookies. This establishes a direct pathway for supply chain contamination or unauthorized corporate access.

The CVSS v3.0 Base Score of 9.8 reflects the severity of these attack vectors, highlighting that exploitation requires no privileges and no user interaction. The high local file disclosure capabilities allow attackers to target application configuration profiles and system directories to gather intelligence for secondary attacks.

Remediation and Hardening

The primary remediation strategy is to upgrade gemini-mcp-tool to version 1.1.6 or higher. This update replaces the flawed sanitization logic with comprehensive Windows command quoting and implements strict directory checks on all file references.

Administrators can apply the update globally using the Node Package Manager:

npm install -g gemini-mcp-tool@latest

If immediate patching is not possible, the following defensive measures are recommended:

  1. Restrict access to the MCP server API to localhost or authorized internal network interfaces.
  2. Avoid running the MCP server within administrative or root security contexts.
  3. Temporarily disable the integration in the client settings, such as claude_desktop_config.json, to prevent command execution routines.

Official Patches

jamubcEmergency security fix for CVE-2026-0755 releasing version 1.1.6

Fix Analysis (2)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
3.34%
Top 13% most exploited

Affected Systems

gemini-mcp-tool

Affected Versions Detail

Product
Affected Versions
Fixed Version
gemini-mcp-tool
jamubc
<= 1.1.51.1.6
AttributeDetail
CWE IDCWE-78
Attack VectorNetwork
CVSS v3.0 Score9.8
EPSS Score0.03336
ImpactRemote Code Execution / Local File Exfiltration
Exploit StatusPoC Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

The software constructs an OS command using externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended OS command when it is sent to a downstream component.

Known Exploits & Detection

Zero Day InitiativeZDI-26-021: gemini-mcp-tool execAsync Command Injection Remote Code Execution Vulnerability

Vulnerability Timeline

Vulnerability reported to the vendor via ZDI
2025-07-25
ZDI published zero-day advisory ZDI-26-021
2026-01-09
Vulnerability officially assigned CVE-2026-0755
2026-01-23
Initial Windows execution compatibility fix committed
2026-04-30
Emergency security patch 1.1.6 released to address vulnerability completely
2026-05-30

References & Sources

  • [1]ZDI-26-021 Advisory
  • [2]CVE-2026-0755 on CVE.org
  • [3]gemini-mcp-tool Repository
  • [4]gemini-mcp-tool Documentation

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•4 minutes ago•CVE-2026-53865
7.2

CVE-2026-53865: Arbitrary Local Command Execution in OpenClaw via Untrusted Search Path

A critical untrusted search path vulnerability (CWE-426) exists in OpenClaw, an open-source, multi-platform personal AI assistant. In versions prior to 2026.5.2 (and up to 2026.5.26 in specific deployment configurations), the application merges workspace-derived configuration parameters into the operating system environment object. When executing administrative maintenance routines, OpenClaw invokes external system commands, such as the 'trash' utility, without verifying the underlying executable path. This allows a low-privileged local user or workspace collaborator to hijack binary execution flows, resulting in arbitrary command execution within the privilege context of the OpenClaw service wrapper.

Amit Schendel
Amit Schendel
0 views•6 min read
•32 minutes ago•CVE-2026-53852
5.4

CVE-2026-53852: Scope Containment Bypass in OpenClaw Device Re-pairing

OpenClaw versions prior to 2026.4.25 are subject to a scope containment bypass vulnerability in the device re-pairing component. When processing re-pairing requests, the application backend fails securely, allowing authenticated operators to bypass authorization containment policies. By submitting a re-pairing payload with an empty or omitted scope array, an operator can skip containment checks and retain broader, previously established administrative privileges. This vulnerability is classified under CWE-636: Not Failing Securely ('Failing Open').

Amit Schendel
Amit Schendel
1 views•8 min read
•about 1 hour ago•CVE-2026-53854
6.0

CVE-2026-53854: Privilege Escalation via Wildcard Authorization Inheritance in OpenClaw

CVE-2026-53854 is an authorization bypass vulnerability in OpenClaw, an open-source WhatsApp gateway CLI and Pi RPC agent. The flaw exists in the command authentication flow where low-privilege actors communicating via internal or webchat interfaces inherit global wildcard authorization states across channel boundaries. This cross-channel inheritance allows unauthorized command execution with administrative privileges.

Amit Schendel
Amit Schendel
2 views•5 min read
•about 2 hours ago•GHSA-G7M4-839X-CH6V
8.7

GHSA-g7m4-839x-ch6v: Denial of Service via Unbounded Digits Parameter in spomky-labs/otphp

The spomky-labs/otphp library prior to version 11.4.3 is vulnerable to an unhandled DivisionByZeroError crash when parsing provisioning URIs containing a digits parameter value equal to or greater than 40. This allows unauthenticated remote attackers to trigger a Denial of Service by supplying a crafted URI, which causes float-to-integer cast overflow and subsequent division-by-zero fatal error in modern PHP runtimes.

Alon Barad
Alon Barad
2 views•7 min read
•about 3 hours ago•GHSA-2JX3-65F3-XR8R
5.3

GHSA-2JX3-65F3-XR8R: Dynamic Property Injection (Mass Assignment) in spomky-labs/otphp

A critical mass-assignment (property injection) vulnerability exists in the PHP One-Time Password (OTP) library spomky-labs/otphp within the Factory::loadFromProvisioningUri method. When an application loads an OTP provisioning URI (such as a QR code configuration link), a hostile URI can inject query parameters that dynamically overwrite internal, private, or read-only object properties of the OTP instance. This behavior leads to application state corruption, validation bypasses, or uncaught TypeErrors that crash the executing application process.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 4 hours ago•GHSA-6VVH-PXR4-25R7
5.9

GHSA-6vvh-pxr4-25r7: Cryptographic Integrity Degradation in JWT Framework ChaCha20-Poly1305 Key Encryption

An implementation flaw in the experimental Chacha20Poly1305 key-encryption algorithm within the PHP JWT Framework (web-token/jwt-framework) discards the Poly1305 authentication tag during key wrapping and omits it during decryption. This degrades the Authenticated Encryption with Associated Data (AEAD) protection to unauthenticated ChaCha20, allowing an attacker to manipulate the encrypted Content Encryption Key (CEK) without detection.

Amit Schendel
Amit Schendel
4 views•7 min read