CourseModel Context Protocol: The Complete Course · Module 10: Design Patterns and Agentic Systems · part 74 of 77
Part 74 · Module 10: Design Patterns and Agentic Systems

Incident: A code sandbox that shared its server's runtime

9 min read·13 Oct 2026
Module 10 · Incident file · About 30 minutes

What happened

MCP host asks for code run_python_code code a model wrote Pyodide in Deno called a sandbox the label promised isolation from the system
mcp-run-python took code a model wrote (amber) and ran it in Pyodide inside Deno, which its README called isolated.

mcp-run-python was Pydantic's MCP server for running Python that a model writes, the code execution shape from Lesson 1. Its repository describes it as an "MCP server to run Python code in a sandbox", and its README said: "Code is executed using Pyodide in Deno and is therefore isolated from the rest of the operating system" (pydantic/mcp-run-python, fetched 13 October 2026). The code had moved there from Pydantic AI; the repository was created on 1 September 2025, and the last release, 0.0.22, reached PyPI on 11 December 2025 (PyPI).

On 9 February 2026 JFrog Security Research published JFSA-2026-001653030, found by Natan Nehorai and tracked as CVE-2026-25905: "Lack of isolation in mcp-run-python leads to MCP server takeover" (JFrog). In JFrog's words, "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."

1 Sep 2025 repo created 11 Dec 2025 0.0.22, last 9 Feb 2026 JFrog, CVE 12 Feb 2026 advisory: no fix
Every release up to 0.0.22 was affected (red); JFrog reported it on 9 February 2026 (blue) and no fixed version followed.

The GitHub advisory, GHSA-pfv4-wmph-5gc6, lists every version up to 0.0.22 as affected, no patched version, a CVSS score of 5.8 and weakness CWE-653, "Improper Isolation or Compartmentalization" (GitHub Advisory Database, updated 12 February 2026). JFrog adds that the project "is archived and unlikely to receive a fix", and "No mitigations are supplied for this issue." The cost on record is the tool itself: the advisory tells users to stop using the package, and the README now opens with a notice that the project is retired because "there's just no safe way to run Python within pyodide safely with reasonable latency".

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.