Miggo Logo

CVE-2025-53372: Node.js Sandbox MCP Server vulnerability can lead to Sandbox Escape via Command Injection

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.28945%
Published
7/8/2025
Updated
7/8/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
node-code-sandbox-mcpnpm<= 1.2.01.3.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists because the application uses child_process.execSync and child_process.exec to construct and execute shell commands using unsanitized user input. Specifically, the container_id parameter, and in some cases other parameters like image and command, are directly concatenated into a command string. This allows an attacker to inject shell metacharacters (e.g., $(...), |, &&) and execute arbitrary commands on the host machine where the MCP server is running, effectively escaping the Docker sandbox.

The patch addresses this by replacing all instances of execSync and exec with the safer execFileSync and execFile APIs. These APIs take command arguments as an array, which prevents shell interpretation of the input and mitigates the command injection vulnerability. Additionally, input sanitization functions like sanitizeContainerId and sanitizeShellCommand have been introduced as a defense-in-depth measure.

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** `no**-*o**-s*n**ox-m*p` 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**Syn*`, *n**lin* *n *tt**k*r to inj**t *r*itr*r

Reasoning

T** vuln*r**ility *xists ****us* t** *ppli**tion us*s `**il*_pro**ss.*x**Syn*` *n* `**il*_pro**ss.*x**` to *onstru*t *n* *x**ut* s**ll *omm*n*s usin* uns*nitiz** us*r input. Sp**i*i**lly, t** `*ont*in*r_i*` p*r*m*t*r, *n* in som* **s*s ot**r p*r*m*t*