CVE-2025-53372: Command Injection Vulnerability in node-code-sandbox-mcp Leading to Remote Code Execution
Summary
CVE-2025-53372: Node.js Sandbox MCP Server vulnerability can lead to Sandbox Escape via Command Injection. Affects node-code-sandbox-mcp versions < 1.3.0. Fixed in 1.3.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The node-code-sandbox-mcp package is designed to facilitate the execution of code within a controlled environment, specifically using Docker containers. It allows users to run JavaScript code safely, leveraging sandboxing techniques to isolate execution. However, the package has a critical vulnerability that arises from improper handling of user input, making it susceptible to command injection attacks.
Vulnerability Detail
A command injection vulnerability exists in the node-code-sandbox-mcp MCP Server due to the unsanitized use of input parameters in a call to child_process.execSync. This flaw allows attackers to inject arbitrary system commands, potentially leading to remote code execution with the privileges of the server process. The vulnerability is exacerbated by the server's construction of shell commands using unvalidated user input, which can include shell metacharacters such as '|', '>', and '&&'. Successful exploitation can bypass the intended sandbox protections, posing a significant security risk.
How To Fix
Latest published version: 1.3.0 as of 23 Oct 2026
npm install node-code-sandbox-mcp@1.3.0
The newest release already contains this fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using the vulnerable functionality that relies on child_process.execSync with untrusted input until the package is updated. If you must use it, ensure that all inputs are properly sanitized and validated before being passed to the command execution functions.
Conclusion
The node-code-sandbox-mcp package has a critical command injection vulnerability (CVE-2025-53372) that can lead to remote code execution. It is essential to update to the patched version (1.3.0 or later) and implement best practices for input validation to mitigate risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for node-code-sandbox-mcp →
FAQ
CVE-2025-53372 is a command injection vulnerability found in the node-code-sandbox-mcp package, which can lead to remote code execution.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to test your application without signup.
The vulnerability can lead to remote code execution, allowing attackers to execute arbitrary commands on the host machine, which can compromise the entire system.
You can update the package by running the command: npm install node-code-sandbox-mcp@latest in your project directory.
If an immediate update is not possible, avoid using the vulnerable functionality and ensure that any user inputs are sanitized before being processed.