Sandbox escape in Prefab UI Pyodide runner allows host code execution
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Privilege escalation, Security bypass, Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-269, CWE-693 and CWE-94.
Summary
Prefab UI from 0.14.0 before 0.21.0 runs caller-supplied Python in a Pyodide sandbox, but the Deno API stays reachable from the JavaScript global object and Deno starts with unrestricted read, write and network permissions. This lets the Python code escape the sandbox and read and write files as the server OS user (CWE-269). On a FastMCP server with no authentication, any client that can reach the server can trigger it through the generate_prefab_ui tool, and with authentication any client allowed to call tools can.
Written with Claude Haiku 5.5 from the sources below · 2026-11-02
Description from the CNA
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).
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Upgrade prefab-ui to 0.21.0, which revokes Deno read, write and network permission before the runner accepts code. The fix is commit 030f074 (pull request 538).
Written with Claude Haiku 5.5 from the sources below · 2026-11-02
- Fix · CNA prefab-ui (PrefectHQ) Fixed in 0.21.0
Timeline
- 2026-11-01 Threatist record created from CVE-2026-120338
- 2026-11-01 Alias added: GHSA-3g72-rrqc-f76c
- 2026-11-02 CISA SSVC decision points changed
References
More PrefectHQ vulnerabilities
- TI-2026-25332 FastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerability CVSS 4.0CRITICAL 10.0
- TI-2026-04695 Git Argument Injection in prefecthq/prefect CVSS 3.0CRITICAL 9.9
- TI-2026-03027 Authentication Bypass in prefecthq/prefect CVSS 3.0HIGH 7.5
- TI-2026-06805 PrefectHQ prefect WebSocket Endpoint in missing authentication CVSS 4.0MEDIUM 6.9
- TI-2026-06804 PrefectHQ prefect Health Check API health endswith improper authentication CVSS 4.0MEDIUM 6.9
- TI-2024-07590 CORS Misconfiguration in prefecthq/prefect CVSS 3.0HIGH 7.6
Sources
- CVE-2026-120338 · CVE Program
- CVE-2026-120338 · NVD
- FIRST EPSS
- GHSA-3g72-rrqc-f76c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences