{"cve":"CVE-2026-120338","nvd":{"published":"2026-11-01T16:18:14.970","modified":"2026-11-01T16:18:14.970","status":"Received","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).","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10.0},"cwes":["CWE-94","CWE-269","CWE-693"],"references":["https://github.com/PrefectHQ/prefab","https://github.com/PrefectHQ/prefab/commit/030f074f85e0b1be0dd44b0283185aecb26337a2","https://github.com/PrefectHQ/prefab/pull/538","https://github.com/PrefectHQ/prefab/releases/tag/v0.14.0","https://github.com/PrefectHQ/prefab/releases/tag/v0.20.2"],"reference_tags":[{"url":"https://github.com/PrefectHQ/prefab","tags":[]},{"url":"https://github.com/PrefectHQ/prefab/commit/030f074f85e0b1be0dd44b0283185aecb26337a2","tags":[]},{"url":"https://github.com/PrefectHQ/prefab/pull/538","tags":[]},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.14.0","tags":[]},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.20.2","tags":[]}],"products":[],"affected":[],"source":"nvd","synced_at":"2026-11-01T16:41:47.494881106+00:00"},"epss":null,"kev":null,"exploits":[],"weaknesses":[{"name":"Improper Control of Generation of Code","common_name":"Code Injection","deprecated":false,"replaced_by":[],"id":"CWE-94"},{"name":"Improper Privilege Management","common_name":null,"deprecated":false,"replaced_by":[],"id":"CWE-269"},{"name":"Protection Mechanism Failure","common_name":null,"deprecated":false,"replaced_by":[],"id":"CWE-693"}],"osv":[],"fixed":[],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program.","Public exploits: links to the Exploit Database (https://www.exploit-db.com, by OffSec; index under GPL-2.0), Rapid7's Metasploit Framework modules (https://github.com/rapid7/metasploit-framework, BSD-3-Clause) and ProjectDiscovery's nuclei templates (https://github.com/projectdiscovery/nuclei-templates, MIT). Only the links, titles and dates are stored; no exploit code is fetched or served.","CWE names and descriptions: MITRE's Common Weakness Enumeration (https://cwe.mitre.org), Copyright © 2006–2026, The MITRE Corporation, under the CWE terms of use (https://cwe.mitre.org/about/termsofuse.html). CWE is a trademark of The MITRE Corporation."]}