CVE-2025-53372: Node.js Sandbox MCP Server vulnerability can lead to Sandbox Escape via Command Injection
A command injection vulnerability exists in the node-code-sandbox-mcp
MCP Server. The vulnerability is caused by the unsanitized use of input parameters within a call to child_process.execSync
, enabling an attacker to inject arbitrary system commands. Successful exploitation can lead to remote code execution under the server process’s privileges on the host machine, bypassing the sandbox protection of running code inside docker.
The server constructs and executes shell commands using unvalidated user input directly within command-line strings. This introduces the possibility of shell metacharacter injection (|
, >
, &&
, etc.).
References
- github.com/advisories/GHSA-5w57-2ccq-8w95
- github.com/alfonsograziano/node-code-sandbox-mcp
- github.com/alfonsograziano/node-code-sandbox-mcp/commit/a5e05fab06b20f2ce68326538c0d6cdf5512e10a
- github.com/alfonsograziano/node-code-sandbox-mcp/commit/af860e2258a81ba58f4bfff7ba17e641df0e1178
- github.com/alfonsograziano/node-code-sandbox-mcp/commit/e461a74ecb189b268daac0d972c467b49b2abdd2
- github.com/alfonsograziano/node-code-sandbox-mcp/security/advisories/GHSA-5w57-2ccq-8w95
- nvd.nist.gov/vuln/detail/CVE-2025-53372
Code Behaviors & Features
Detect and mitigate CVE-2025-53372 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →