CVE-2026-25904: MCP Run Python Deno Sandbox Misconfiguration Allows SSRF Attacks via Localhost Access
The `mcp-run-python` tool, used with Pydantic-AI, runs untrusted Python inside a Deno sandbox that is allowed to reach the host's loopback interface. Python code run through it can send HTTP requests to local services and metadata endpoints. Versions up to 0.0.22 are affected. There is no patched version: the project is archived and the advisory says to stop using it.
Published Feb 9, 2026 · Updated Feb 11, 2026 · Analysis Nov 1, 2026
What an attacker can do
The tool starts Deno to isolate Python code from the host. Its network permission includes access to localhost, so the isolation does not hold for network traffic. Code executed in the sandbox can call APIs, databases and other services bound to the host's loopback, and can also reach cloud metadata addresses.
The code that runs is whatever the agent passes to the tool. In an agent setup, that can come from a prompt injection in a document, web page or tool result that makes the model write Python with requests to 127.0.0.1. The CVSS 3.1 vector reflects that: high attack complexity, user interaction and changed scope (CWE-918), with low impact on confidentiality, integrity and availability.
The real damage depends on what listens on the host. Local admin APIs, development databases or an agent's own control port, and cloud credentials from metadata, are the likely prizes. The advisory describes the SSRF only. It does not describe a sandbox escape.
Who is affected
The mcp-run-python pip package, version 0.0.22 and earlier, which includes every release, since no fix exists. It matters most where the host runs services on loopback or has a reachable metadata endpoint. Check:
pip show mcp-run-pythonAlso search MCP client configs for a server entry that launches mcp-run-python.
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
There is no patched version. The project is archived and the maintainers are unlikely to fix it. The advisory recommends you stop using the package right away.
If you need the function, move to an execution environment that enforces strict network isolation, such as blocking all outbound traffic or denying 127.0.0.1 and ::1. The package has no config-based workaround. Remediation means editing the source to remove or narrow the Deno --allow-net flag, or running the tool in a container with no network access.
How to tell if you were hit
Look at the host for connections to loopback services from the Deno process that mcp-run-python starts, and for requests to metadata addresses from it. Review tool-call history for Python snippets that import requests, httpx or urllib, or use fetch, to hit localhost, 127.0.0.1, ::1 or 169.254.169.254. Beam records agent shell commands and MCP tool calls, so you can review which code the agent sent to this tool.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
Server-Side Request Forgery (SSRF): A security vulnerability exists in the mcp-run-python tool (specifically within the Pydantic-AI integration) due to an overly permissive Deno sandbox configuration.
The tool configures the Deno runtime—which is intended to isolate the execution of untrusted Python code—with network permissions that include access to the host's loopback interface (localhost). Consequently, malicious Python code executed through the tool can bypass network isolation and send HTTP requests to internal services running on the host machine. This allows attackers to interact with local APIs, databases, or cloud metadata services that should not be accessible from the sandbox.
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 an alternative execution environment that enforces strict network isolation (e.g., blocking all outbound traffic or explicitly denying access to 127.0.0.1/::1).
Workarounds
There are no configuration-based workarounds provided by the package itself. Remediation requires modifying the source code to restrict the Deno permissions (specifically removing or narrowing the --allow-net flag) or moving the execution to a container with no network access.
Resources
Credited to saivarun3407.
Questions
- Is there a patch for mcp-run-python?
No. The project is archived, and the advisory says it is unlikely to receive a fix. The recommendation is to stop using it.
- Can the sandboxed code escape Deno?
The advisory does not claim that. It says the network permission includes loopback, so the code can send HTTP requests to services on the host.
- Does this need an attacker to write the code?
The code comes from whoever or whatever drives the tool. With an AI agent, a prompt-injected model can produce the requests. The CVSS vector reflects user interaction and high complexity.
- 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 entriesCVE-2026-102943
Dagu MCP DAG specification read bypasses path containment and workspace isolation
medium6.5Nov 10, 2026CVE-2026-102610
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
medium6.4Nov 9, 2026CVE-2026-63655
tsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS
high7.5Nov 9, 2026CVE-2026-76892
tsParticles: Malformed JSON requests can terminate the @tsparticles/mcp-server HTTP process
high8.7Nov 9, 2026CVE-2026-76893
tsParticles: A single anonymous MCP session can monopolize HTTP mode and deny new clients
medium6.9Nov 9, 2026CVE-2026-77604
Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read
high7.5Nov 9, 2026
