NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-25905: MCP Run Python has a Sandbox Escape & Server Takeover Vulnerability

mediumCVSS 3.1 5.8GHSA-pfv4-wmph-5gc6

`mcp-run-python` runs Python in Pyodide without cutting the bridge to the host JavaScript runtime. Python code, from a user or a model, can import the `js` module, change the Node.js environment and overwrite MCP tools registered on the server. Versions through 0.0.22 are affected. No fix is available because the repository is archived.

Published Feb 9, 2026 · Updated Feb 12, 2026 · Analysis Nov 1, 2026

What an attacker can do

runPython and runPythonAsync execute code in Pyodide and leave the JavaScript bridge open. Through the js module, the Python code reaches the global JS environment and the Node.js process hosting the MCP server.

The advisory's named attack is MCP tool shadowing. The Python code replaces a registered tool with its own version. A secure file-reading tool could be swapped for one that copies the files to an external server, while the server keeps answering normally. Every later tool call from the client then goes through the attacker's code.

Code reaches the tool from whoever drives it. In an agent workflow, a prompt injection in a page, document or tool output could make the model submit the Python. The CVSS 3.1 vector shows high complexity, required user interaction and changed scope (CWE-653), with low impact in each of confidentiality, integrity and availability. The effect on a real deployment can be larger than that score suggests, because the whole MCP server process is under the code's control and not just one request.

Who is affected

The mcp-run-python pip package, version 0.0.22 and earlier. As nothing newer is published as a fix, treat every installed copy as affected. Check:

pip show mcp-run-python

Search MCP client settings for server entries that start mcp-run-python. The JFrog write-up for this flaw is tracked as JFSA-2026-001653030.

mcp-run-python

Ecosystem
PyPI
Affected
<= 0.0.22
Fixed in
No patched version yet
Check
pip show mcp-run-python

How to fix it

No patched version exists and the maintainers are unlikely to publish one. Stop using the package. Replace it with a maintained alternative with real sandboxing: Python in a Docker container, or a restricted WASM environment with the JS bridge disabled.

The package has no configuration option that closes the hole. The only in-place remedies are editing the source to disable the Pyodide-to-JS bridge, or running the whole tool in a separate, fully isolated container. After removing it, review the other MCP tools that shared the server process.

How to tell if you were hit

Look for Python snippets sent to the tool that contain import js, from js import, js.globalThis or pyodide.ffi. Compare the list of tools your MCP server exposes now with the list in its source: an extra, renamed or changed tool is a sign of shadowing. Watch the Node.js process for outbound connections to unfamiliar hosts. Beam records agent MCP tool calls and shell commands, so you can review which code was sent to this tool and what tools were called afterwards.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

Critical Sandbox Escape & Server Takeover: A critical security vulnerability exists in mcp-run-python due to a lack of isolation between the Python runtime (Pyodide) and the host JavaScript environment.

The runPython and runPythonAsync functions execute Python code using Pyodide without restricting access to the JavaScript bridge. This allows any executed Python code—whether from a user or an AI model—to access the js module in Pyodide. Through this bridge, the Python code can modify the global JavaScript environment, interact with the Node.js process, and alter the behavior of the MCP server.

Specific Attack Vector: MCP Tool Shadowing Because the Python code can modify the JS runtime, an attacker can dynamically overwrite or "shadow" existing MCP tools registered on the server. For example, an attacker could replace a secure file-reading tool with a malicious version that exfiltrates data to an external server, all while the MCP server appears to be functioning normally.

Patches

No Patch Available: The mcp-run-python project is currently archived and maintainers have indicated it is unlikely to receive a fix.

Recommendation: Users are strongly advised to immediately stop using this package. If functionality is required, users must migrate to a maintained alternative that implements proper sandboxing (e.g., running Python in a Docker container or a restricted WASM environment with the JS bridge disabled).

Workarounds

There are no configuration-based workarounds. Securing the environment requires modifying the source code to disable the Pyodide-to-JS bridge or moving the execution environment to a fully isolated sandbox (e.g., a separate container).

Resources

Credited to saivarun3407.

Questions

Is there a fixed mcp-run-python release?

No. The latest affected version is 0.0.22 and the project is archived. The advisory tells users to stop using the package.

What is MCP tool shadowing?

Python code uses the js bridge to overwrite a registered MCP tool with a malicious one. The server seems normal while the replacement tool, for example a file reader, sends data to an attacker.

How does this differ from CVE-2026-25904?

That entry is about network access to localhost from the Deno sandbox. This one is about the Pyodide-to-JavaScript bridge letting Python code alter the MCP server itself. Both affect the same package and have no patch.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries