Miggo Logo

CVE-2025-54073: mcp-package-docs vulnerable to command injection in several tools

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.44018%
Published
8/5/2025
Updated
8/5/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
mcp-package-docsnpm<= 0.1.270.1.28

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the use of child_process.exec with untrusted user input across several functions in the PackageDocsServer class. The patch replaces the promisified exec with execFile, which does not execute commands within a shell, thus preventing command injection. Additionally, input sanitization is introduced as a defense-in-depth measure. The analysis of the patch identified multiple functions (isGoPackageInstalled, isPythonPackageInstalled, getLocalGoDoc, getLocalPythonDoc, getLocalSwiftDoc, describeGoPackage, and summarisePackage) that were constructing and executing shell commands with unsanitized package names and symbols. An attacker could inject shell metacharacters into these parameters to execute arbitrary commands on the server, leading to remote code execution.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * *omm*n* inj**tion vuln*r**ility *xists in t** `m*p-p**k***-*o*s` M*P S*rv*r. T** vuln*r**ility is **us** *y t** uns*nitiz** us* o* input p*r*m*t*rs wit*in * **ll to `**il*_pro**ss.*x**`, *n**lin* *n *tt**k*r to inj**t *r*itr*ry syst*m

Reasoning

T** vuln*r**ility st*ms *rom t** us* o* `**il*_pro**ss.*x**` wit* untrust** us*r input **ross s*v*r*l *un*tions in t** `P**k****o*sS*rv*r` *l*ss. T** p*t** r*pl***s t** promisi*i** `*x**` wit* `*x***il*`, w*i** *o*s not *x**ut* *omm*n*s wit*in * s**l