CVE-2026-120338: Prefab UI Generative UI Sandbox Escape
A maximum-severity sandbox escape (CVSS 10.0) was published on November 1, 2026 in prefab-ui, the PrefectHQ library whose Generative UI feature 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, but the isolation does not hold in versions 0.14.0 through 0.20.2.
Vulnerability Overview
| Attribute | Value |
|---|---|
| CVE ID | CVE-2026-120338 |
| CVSS Score | 10.0 (Critical) |
| Class | Code injection / sandbox escape |
| Affected Software | prefab-ui 0.14.0 up to, but not including, 0.21.0 |
| Fixed In | 0.21.0 (released 2026-10-26) |
| Published | November 1, 2026 |
| Exploitation | Not known to be exploited as of publication |
| Preconditions | Generative UI enabled (opt-in) and Deno installed on the host |
Technical Description
Two problems combine:
- Deno API left on the global object. The runner leaves
Denoon the JavaScript global. Pyodide'sjsmodule proxies that global, so sandboxed Python can callDeno.readTextFileSyncandDeno.writeTextFileSyncagainst the host filesystem. - Unrestricted launcher permissions. The launcher starts Deno with unrestricted
--allow-read,--allow-writeand--allow-net, so nothing at the Deno layer stops those calls.
An attacker who can supply code can read and write files as the server's OS user, and can persist code execution by writing a .pth file into the server virtualenv's site-packages, which Python executes at interpreter startup.
Remote Reachability
FastMCP's GenerativeUI provider registers the MCP tool generate_prefab_ui and forwards its code argument into the sandbox. Without authentication, any client that can reach the server can call it. With authentication, any client permitted to call tools can.
Impact Assessment
| Impact Area | Description |
|---|---|
| Confidentiality | Read any file the server user can read, including environment files and credentials |
| Integrity | Write arbitrary files, including persistence via .pth files |
| Availability | Host files can be overwritten or removed |
| Lateral Movement | Outbound network access is unrestricted from the sandbox |
Remediation Guidance
- Upgrade prefab-ui to 0.21.0 or later. The fix revokes Deno read, write and network permissions after the runtime loads and before code is accepted, starts the process with
--no-prompt, and limits bootstrap network access tocdn.jsdelivr.net. - Hunt for prior compromise. The patch does not undo earlier writes. Check
site-packagesin server virtualenvs for unexpected.pthfiles. - Rotate secrets reachable by the server user if the tool was exposed to untrusted callers.
- Reduce exposure. If upgrading is not immediately possible, disable Generative UI or remove the
generate_prefab_uitool, and put MCP servers behind authentication and network controls. - Monitor for unexpected file writes by the server process and unusual
generate_prefab_uicalls.
Key Takeaways
- A CVSS 10.0 sandbox escape affects prefab-ui 0.14.0 through 0.20.2; 0.21.0 fixes it
- Servers exposing
generate_prefab_uiover MCP are remotely reachable by any permitted tool caller - Patching does not remove planted files, so check for
.pthpersistence - Treat "sandboxed" LLM-code execution as untrusted until permissions are enforced at the runtime layer