# CVE-2026-120338 - Prefab UI Pyodide sandbox escape to host RCE

DevFeed: [CVE-2026-120338 - Prefab UI Pyodide sandbox escape to host RCE](<https://devfeed.tech/articles/cve-2026-120338-prefab-ui-pyodide-sandbox-escape-to-host-rce-110717.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-120338>)

Author: CVEFEED.io

Published: 2026-11-01T15:24:54Z

Content type: news

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [AI Sandbox](<https://devfeed.tech/topics/ai-sandbox.md>), [container escape](<https://devfeed.tech/topics/container-escape.md>), [generative-ai-tools](<https://devfeed.tech/topics/generative-ai-tools.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [code](<https://devfeed.tech/tags/code.md>), [code-execution](<https://devfeed.tech/tags/code-execution.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-120338](<https://devfeed.tech/tags/cve-2026-120338.md>), [deno](<https://devfeed.tech/tags/deno.md>), [generative-ui](<https://devfeed.tech/tags/generative-ui.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [mcp-tool](<https://devfeed.tech/tags/mcp-tool.md>), [no-authentication](<https://devfeed.tech/tags/no-authentication.md>), [os](<https://devfeed.tech/tags/os.md>), [pyodide](<https://devfeed.tech/tags/pyodide.md>), [python](<https://devfeed.tech/tags/python.md>), [rce](<https://devfeed.tech/tags/rce.md>), [sandbox](<https://devfeed.tech/tags/sandbox.md>), [sandbox-escape](<https://devfeed.tech/tags/sandbox-escape.md>), [ui](<https://devfeed.tech/tags/ui.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

## AI overview

Prefab UI versions 0.14.0-0.20.2 expose host file access through the Generative UI sandbox: caller-supplied Python in Pyodide can reach the Deno API left on JavaScript's global object, using it to read and write files as the server OS user and potentially persist execution via a .pth file. The remote route described is FastMCP's opt-in GenerativeUI provider and its generate_prefab_ui tool. Without FastMCP authentication, any client able to reach the server can call it; with authentication, callers must be authorized to use tools. Exploitation also requires Deno installed. The issue was confirmed on 0.20.2 and fixed in 0.21.0 by revoking Deno read, write, and network permissions before accepting code, starting with --no-prompt, and limiting bootstrap network access to cdn.jsdelivr.net.

## Source excerpt

CVE ID :CVE-2026-120338 Published : Nov. 1, 2026, 3:24 p.m. | 54 minutes ago Description :Prefab UI's Generative UI sandbox runs caller-supplied Python inside Pyodide, Python compiled to WebAssembly, in a Deno subprocess. The feature is documented as isolation for untrusted code, including LLM-written UI. From prefab-ui 0.14.0 through 0.20.2 the launcher starts Deno with unrestricted --allow-read, --allow-write, and --allow-net, and the runner leaves the Deno API on the JavaScript global object. Pyodide's js module proxies that global, so the Python can call Deno.readTextFileSync and Deno.writeTextFileSync. A caller who can supply the code can read and write files as the server OS user, and can persist code execution by writing a .pth file into the server virtualenv's site-packages. The usual remote path is FastMCP's GenerativeUI provider, which registers the MCP tool generate_prefab_ui and forwards that tool's code argument into this sandbox. On a FastMCP server with no authentication configured, any client who can reach the server can call the tool. With authentication, any client allowed to call tools can. Generative UI is opt-in, and the host must have Deno installed. Confirmed on prefab-ui 0.20.2. Fixed in 0.21.0: after the runtime and Prefab sources load, the runner revokes Deno read, write, and network permission before it accepts code, the process is started with --no-prompt so a permission request cannot grant them again, and bootstrap network access is limited to cdn.jsdelivr.net. The fix is commit 030f074 (pull request 538). Severity: 10.0 | CRITICAL Visit the link for more details, such as CVSS details, affected products, timeline, and more...