CVE-2026-113378: mcollina mcp-ripgrep command injection via fileType parameter

CVE-2026-113378 · Severity: medium · CVSS 5.3 · Published 2026-10-20

mcp-ripgrep is a Model Context Protocol server that wraps the ripgrep search tool for use by AI assistants like Claude. A command injection vulnerability in the fileType parameter allows attackers to execute arbitrary system commands on the host running the server. Exploitation can occur through direct API calls or indirectly via prompt injection when an AI assistant processes untrusted input, leading to remote code execution under the server process privileges.

Vendors: Mcollina.

Quick answers

Is CVE-2026-113378 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-113378 being exploited in the wild.
How severe is CVE-2026-113378?
Medium severity, with a CVSS score of 5.3, published 20 October 2026.
Which products and versions are affected?
Mcollina Mcp-Ripgrep up to 0.4.0.
Is there a fix for CVE-2026-113378?
No fixed version is recorded yet. Avoid using child_process.spawn with shell: true; instead pass arguments as a separate array with shell: false to prevent shell interpretation of user input. Additionally, validate and restrict the fileType parameter to a whitelist of legitimate ripgrep file type values.</anigation> </invoke> If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-113378 attacked?
It is attacked with local access or from the adjacent network.
Am I affected by CVE-2026-113378?
Check whether you run Mcollina Mcp-Ripgrep at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

Avoid using child_process.spawn with shell: true; instead pass arguments as a separate array with shell: false to prevent shell interpretation of user input. Additionally, validate and restrict the fileType parameter to a whitelist of legitimate ripgrep file type values.</anigation> </invoke>

Technical details

The vulnerability is a CWE-78 OS command injection caused by unsanitized use of the fileType parameter in src/index.ts. The vulnerable code constructs shell commands by string concatenation (e.g., `command += \` -t ${fileType} \``) and passes them to child_process.spawn with shell: true, while other parameters are escaped via escapeShellArg. An attacker can inject shell metacharacters (backticks, $(), |, &&, etc.) via the fileType argument to advanced-search tool to execute arbitrary commands. The attack vector is local/network-adjacent (MCP stdio transport requires access to the server process), with no authentication required.

Affected products

  • mcollina mcp-ripgrep up to 0.4.0

Timeline

  • 2026-10-20: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.