Vulnerabilities in pkg:pypi/mcp-run-python

PACKAGE
Advisory Identifier: GHSA-pfv4-wmph-5gc6
Advisory Summary

CVE-2026-25905 is a MODERATE (CVSS 5.8) mcp run python has a vulnerability (CWE-653: Improper Isolation or Compartmentalization) affecting Mcp run python libraries in the PyPI ecosystem. The issue involves mcp run python has a sandbox escape & server takeover vulnerability. Remediation is available in the latest vendor maintenance releases.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/mcp-run-python

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/mcp-run-python. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pfv4-wmph-5gc6 CVE-2026-25905 MODERATE MCP Run Python has a Sandbox Escape & Server Takeover Vulnerability
GHSA-6fgp-m6q4-j3q5 CVE-2026-25904 MODERATE MCP Run Python Deno Sandbox Misconfiguration Allows SSRF Attacks via Localhost Access

CVE-2026-25905 at a Glance

CVE Identifier CVE-2026-25905
GHSA Identifier GHSA-pfv4-wmph-5gc6
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-653: Improper Isolation or Compartmentalization
Affected Product Mcp run python
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-25905

To remediate this vulnerability, upgrade all affected Mcp run python dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mcp-run-python fixed: Latest secure release
pip install mcp-run-python>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mcp-run-python

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-25905, inspect your installed packages using pip:

pip show mcp-run-python

Analyze the terminal output to locate any version of Mcp run python in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show mcp-run-python command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-653: Improper Isolation or Compartmentalization, where the product does not properly compartmentalize or isolate functionality, processes, or resources that require different privilege levels, rights, or permissions. In Mcp run python, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 * [CVE-2026-25905](https://nvd.nist.gov/vuln/detail/CVE-2026-25905) * [JFrog Security Analysis: MCP Takeover](https://research.jfrog.com/vulnerabilities/mcp-run-python-lack-of-isolation-mcp-takeover-jfsa-2026-001653030)

CVE-2026-25905 Affected Mcp run python Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
mcp-run-python
PyPI
≤ 0.0.22

References

Frequently Asked Questions

What is CVE-2026-25905?
CVE-2026-25905 is a security vulnerability in Mcp run python involving MCP Run Python has a Sandbox Escape & Server Takeover Vulnerability under CWE-653: Improper Isolation or Compartmentalization.
Which Mcp run python versions are affected?
Affected versions include releases prior to current release patches across affected packages: mcp-run-python.
What version fixes CVE-2026-25905?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-run-python affected?
Yes, mcp-run-python is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-25905?
CVE-2026-25905 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2026-25905?
CVE-2026-25905 is classified under CWE-653: Improper Isolation or Compartmentalization (The product does not properly compartmentalize or isolate functionality, processes, or resources that require different privilege levels, rights, or permissions.).
How can I check PyPI dependencies for CVE-2026-25905?
Run the dependency tree command: 'pip show mcp-run-python'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfv4-wmph-5gc6",
  "modified" : "2026-02-12T03:09:38Z",
  "published" : "2026-02-09T09:30:22Z",
  "aliases" : [ "CVE-2026-25905" ],
  "summary" : "MCP Run Python has a Sandbox Escape & Server Takeover Vulnerability",
  "details" : "### Impact\n**Critical Sandbox Escape & Server Takeover:**\nA critical security vulnerability exists in `mcp-run-python` due to a lack of isolation between the Python runtime (Pyodide) and the host JavaScript environment.\n\nThe `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.\n\n**Specific Attack Vector: MCP Tool Shadowing**\nBecause 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.\n\n### Patches\n**No Patch Available:**\nThe `mcp-run-python` project is currently **archived** and maintainers have indicated it is unlikely to receive a fix.\n\n**Recommendation:**\nUsers are strongly advised to **immediately stop using** this package.\nIf 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).\n\n### Workarounds\nThere 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).\n\n### Resources\n* [CVE-2026-25905](https://nvd.nist.gov/vuln/detail/CVE-2026-25905)\n* [JFrog Security Analysis: MCP Takeover](https://research.jfrog.com/vulnerabilities/mcp-run-python-lack-of-isolation-mcp-takeover-jfsa-2026-001653030)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mcp-run-python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.0.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25905"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pydantic/mcp-run-python"
  }, {
    "type" : "WEB",
    "url" : "https://research.jfrog.com/vulnerabilities/mcp-run-python-lack-of-isolation-mcp-takeover-jfsa-2026-001653030"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-653" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-12T03:09:38Z",
    "nvd_published_at" : "2026-02-09T09:16:34Z"
  }
}