Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local access to MCP server
-
ExploitSupply crafted fileType argument
-
ExecutionBypass unescaped arg via shell metacharacters
-
ImpactExecute arbitrary OS command as running user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the mcollina mcp-ripgrep MCP server (versions up to 0.4.0) to be deployed, and the attacker must be able to control the fileType argument of the Advanced Search Tool in src/index.ts - the one argument NOT run through the project's escapeShellArg routine (sibling arguments are escaped), which is the specific CWE-78 oversight. Exploitation is strictly local (AV:L) with no remote path, and needs low-privilege access (PR:L) sufficient to invoke the search tool; no user interaction is required. LIMITING FACTORS: no network vector, injected commands run only with the privileges of the user already running the MCP server/ripgrep (the basis of the maintainer's dispute that this is expected 'runs commands on your machine' behavior), and realistic risk hinges on whether untrusted input can actually reach the fileType parameter in a given deployment. |
| Impact | Signals are mostly consistent toward a LOW-to-MODERATE real-world priority. The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:L/UI:N) scores 4.8 (medium): exploitation is local, not network-facing, and requires low-privilege access (PR:L) sufficient to invoke the Advanced Search Tool and control its fileType argument. POC/exploit code is publicly available (gist), and the CVSS carries E:P (Proof-of-Concept maturity) - but this is NOT the same as active exploitation: there is no CISA KEV listing and no EPSS score was provided in the input, so widespread or automated exploitation is unsubstantiated. A notable conflict exists between sources: VulDB records that 'the real existence of this vulnerability is still doubted,' and the maintainer documents the shell-execution behavior as an expected caution ('it runs commands on your machine'), yet the supplied technical analysis shows fileType is the one argument skipped by the project's own escapeShellArg routine - indicating a genuine CWE-78 oversight rather than fully documented design. Net: a real but bounded local command-injection issue whose practical impact depends on whether untrusted input (e.g., via prompt injection or malicious data feeding the MCP tool) can reach the fileType parameter; it is not a drop-everything priority absent network exploitability or confirmed in-the-wild use. |
| Exploit ScenarioDerived | An actor able to supply input to the mcp-ripgrep Advanced Search Tool (for example through a prompt-injection or malicious-document path that controls the fileType parameter) embeds shell metacharacters that are not passed through escapeShellArg, causing ripgrep to be invoked with attacker-chosen OS commands. A public proof-of-concept exists (gist by sandh0t). Exploitation is local and low-complexity but requires the ability to invoke the tool, and executes with the privileges of the user running the MCP server. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 20, 2026
OS command injection in mcollina mcp-ripgrep through 0.4.0 lets a local, low-privilege user who can control the Advanced Search Tool's fileType argument run arbitrary shell commands with the MCP server's privileges. Publicly available exploit code exists, and the finding is disputed by the maintainer as documented shell-execution behavior; no CISA KEV active-exploitation confirmation is present. Real-world priority is low-to-moderate because the attack is strictly local and depends on untrusted input reaching fileType.
RemediationAI
No vendor-released patch identified at time of analysis; the upstream corrective change should wrap fileType with the same escapeShellArg routine used for sibling arguments, but a released patched version is not independently confirmed. Until that is available, restrict invocation of the MCP server and its Advanced Search Tool to trusted local callers, disable the Advanced Search Tool if it is not required (accepting loss of search functionality), enforce an allowlist of expected fileType values before they reach the shell command (may break legitimate searches if incomplete), and run the server under a least-privilege account or container to limit the blast radius of injected commands. Consult https://github.com/mcollina/mcp-ripgrep#security-considerations and https://vuldb.com/vuln/422653, and validate the disputed finding with the maintainer before relying on it for risk decisions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The mcp-ripgrep project is a Model Context Protocol server that exposes ripgrep-based search to MCP clients. In src/index.ts, the Advanced Search Tool builds a shell command from search parameters and applies escapeShellArg to sibling arguments but omits that escaping for fileType, producing a CWE-78 OS command injection path when fileType contains shell metacharacters. The CPE cpe:2.3:a:mcollina:mcp-ripgrep:*:*:*:*:*:*:*:* covers the affected product line through 0.4.0. Exploitation is local and needs low-privilege access sufficient to invoke the search tool; public exploit code has been released, but the maintainer disputes the flaw as expected behavior because the tool intentionally runs shell commands, so risk depends on whether untrusted input can reach fileType in a given deployment.
Know when Mcp Ripgrep gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Local-only arg injection (AV:L) invoked with low privilege (PR:L) that bypasses escaping to run arbitrary OS commands, yielding high C/I/A bounded to the running user (S:U).
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
3DescriptionCVE.org
A security flaw has been discovered in mcollina mcp-ripgrep up to 0.4.0. Affected is an unknown function of the file src/index.ts of the component Advanced Search Tool. The manipulation of the argument fileType results in os command injection. The attack requires a local approach. The exploit has been released to the public and may be used for attacks. The real existence of this vulnerability is still doubted at the moment. The code's own escapeShellArg on sibling arguments (skipped only for fileType) indicates that this is a CWE-78 oversight, not a documented design. The project maintainer cites the documentation: "This MCP server executes shell commands using the ripgrep tool. While efforts have been made to safely escape arguments, use caution when providing input, as it runs commands on your machine."
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
EUVD-2026-104861
GHSA-qq9r-r4m4-c72m
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB