Miggo Logo

CVE-2025-6514: mcp-remote exposed to OS command injection via untrusted MCP server connections

9.7

CVSS Score
3.1

Basic Information

EPSS Score
0.27628%
Published
7/9/2025
Updated
7/9/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
mcp-remotenpm>= 0.0.5, < 0.1.160.1.16

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The analysis of the provided security patch (commit 607b226a356cb61a239ffaba2fb3db1c9dea4bac) reveals that the vulnerability lies within the sanitizeUrl function in src/lib/utils.ts. The vulnerability description states that the issue is an OS command injection via crafted input from an authorization_endpoint response. The commit message, "Forcibly escape username/pass for basic auth URLs too," and the code changes directly point to a lack of sanitization for the username and password parts of a URL. The patch adds encodeURIComponent to these fields, which fixes the vulnerability. Therefore, the sanitizeUrl function is identified as the vulnerable function because, prior to the patch, it would process a malicious URL without escaping characters that could be interpreted by the shell, leading to command execution. A runtime profiler would show this function being called when the application processes the malicious authorization_endpoint URL, making it a key indicator for detecting exploitation of this CVE.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

m*p-r*mot* is *xpos** to OS *omm*n* inj**tion w**n *onn**tin* to untrust** M*P s*rv*rs *u* to *r**t** input *rom t** *ut*oriz*tion_*n*point r*spons* URL

Reasoning

T** *n*lysis o* t** provi*** s**urity p*t** (*ommit ****************************************) r*v**ls t**t t** vuln*r**ility li*s wit*in t** `s*nitiz*Url` *un*tion in `sr*/li*/utils.ts`. T** vuln*r**ility **s*ription st*t*s t**t t** issu* is *n OS *o