CVE-2026-25905 Lack of isolation in mcp-run-python leads to MCP server takeover

Medium 5.8 Published Updated

Attackers can execute arbitrary code to hijack the MCP server due to lack of isolation between Python and JavaScript environments in the archived mcp-run-python library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-25905?

CVE-2026-25905 is a medium-severity code injection vulnerability in mcp-run-python, published on 9 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

The Python code being run by 'runPython' or 'runPythonAsync' is not isolated from the rest of the JS code, allowing any Python code to use the Pyodide APIs to modify the JS environment. This may result in an attacker hijacking the MCP server - for malicious purposes including MCP tool shadowing. Note - the "mcp-run-python" project is archived and unlikely to receive a fix.

Weakness: CWE-653

Which versions are affected by CVE-2026-25905?

3 open source packages ship an affected version, including mcp-run-python.

PackageAffectedFixed in
mcp-run-python PyPIAll versions to 0.0.22None
mcp-run-python PyPIAll versions to 0.0.22None
mcp-run-python PyPIAll versions to 0.0.22None

How do I fix CVE-2026-25905?

No fix has been published for CVE-2026-25905 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-25905 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25905 exists.

Sources

Also known as GHSA-pfv4-wmph-5gc6, PYSEC-2026-2628.

Is CVE-2026-25905 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free