{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-120338","assignerOrgId":"48a46f29-ae42-4e1d-90dd-c1676c1e5e6d","state":"PUBLISHED","assignerShortName":"JFROG","dateReserved":"2026-11-01T15:12:50.987Z","datePublished":"2026-11-01T15:24:54.158Z","dateUpdated":"2026-11-01T15:24:54.158Z"},"containers":{"cna":{"providerMetadata":{"orgId":"48a46f29-ae42-4e1d-90dd-c1676c1e5e6d","shortName":"JFROG","dateUpdated":"2026-11-01T15:24:54.158Z"},"title":"Prefab UI Pyodide sandbox escape to host RCE","problemTypes":[{"descriptions":[{"lang":"en","cweId":"CWE-693","description":"CWE-693: Protection Mechanism Failure","type":"CWE"}]},{"descriptions":[{"lang":"en","cweId":"CWE-94","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]},{"descriptions":[{"lang":"en","cweId":"CWE-269","description":"CWE-269: Improper Privilege Management","type":"CWE"}]}],"affected":[{"vendor":"PrefectHQ","product":"prefab-ui","collectionURL":"https://pypi.org/project/prefab-ui/","packageName":"prefab-ui","repo":"git://github.com/PrefectHQ/prefab","programFiles":["src/prefab_ui/sandbox/_pyodide.py","src/prefab_ui/sandbox/runner.js"],"versions":[{"status":"affected","version":"0.14.0","lessThan":"0.21.0","versionType":"semver"}],"defaultStatus":"unaffected"}],"descriptions":[{"lang":"en","value":"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).","supportingMedia":[{"type":"text/html","base64":false,"value":"<p>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).</p>"}]}],"references":[{"url":"https://github.com/PrefectHQ/prefab","name":"Prefab repository","tags":["product"]},{"url":"https://pypi.org/project/prefab-ui/","name":"prefab-ui on PyPI","tags":["product"]},{"url":"https://github.com/PrefectHQ/prefab/security/advisories/GHSA-595q-jv4r-q7j9","name":"GHSA-595q-jv4r-q7j9","tags":["vendor-advisory"]},{"url":"https://github.com/PrefectHQ/prefab/pull/538","name":"Refresh dependencies and fix renderer and sandbox regressions (fix pull request)","tags":["patch"]},{"url":"https://github.com/PrefectHQ/prefab/commit/030f074f85e0b1be0dd44b0283185aecb26337a2","name":"Fix commit 030f074","tags":["patch"]},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.21.0","name":"v0.21.0","tags":["release-notes"]},{"url":"https://pypi.org/project/prefab-ui/0.21.0/","name":"prefab-ui 0.21.0","tags":["release-notes"]},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.20.2","name":"v0.20.2 (confirmed affected)","tags":["technical-description"]},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.14.0","name":"v0.14.0 (first release with the sandbox)","tags":["technical-description"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"FastMCP server with GenerativeUI enabled, Deno installed, and no authentication configured"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"CRITICAL","baseScore":10,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"Authenticated client allowed to call tools on a server that executes untrusted code in the Generative UI sandbox"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"CRITICAL","baseScore":9.9,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"}}],"timeline":[{"time":"2026-03-24T17:21:00.000Z","lang":"en","value":"Pyodide sandbox added with --allow-read, --allow-write, and --allow-net (commit fc4362f3, pull request 334)"},{"time":"2026-03-27T02:36:00.000Z","lang":"en","value":"prefab-ui 0.14.0 published on PyPI, the first release that includes the sandbox"},{"time":"2026-06-03T02:13:00.000Z","lang":"en","value":"prefab-ui 0.20.2 published. This is the release confirmed in testing."},{"time":"2026-08-05T16:12:00.000Z","lang":"en","value":"Reported to PrefectHQ as GHSA-595q-jv4r-q7j9. The advisory is still in triage and has no CVE id."},{"time":"2026-10-25T18:48:00.000Z","lang":"en","value":"Fix merged in pull request 538 (commit 030f074). The runner revokes read, write, and network permission before accepting code."},{"time":"2026-10-26T19:00:00.000Z","lang":"en","value":"prefab-ui 0.21.0 published on PyPI with the fix. No vendor advisory text was published with the release."}],"credits":[{"lang":"en","value":"Yuval Moravchick","type":"finder"},{"lang":"en","value":"JFrog Security Research","type":"coordinator"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.5"}}}}