{"api_version":"1","generated_at":"2026-11-02T04:20:49+00:00","cve":"CVE-2026-120338","urls":{"html":"https://cve.report/CVE-2026-120338","api":"https://cve.report/api/cve/CVE-2026-120338.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-120338","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-120338"},"summary":{"title":"Prefab UI Pyodide sandbox escape to host RCE","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).","state":"PUBLISHED","assigner":"JFROG","published_at":"2026-11-01 16:18:14","updated_at":"2026-11-01 16:18:14"},"problem_types":["CWE-94","CWE-269","CWE-693","CWE-693 CWE-693: Protection Mechanism Failure","CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')","CWE-269 CWE-269: Improper Privilege Management"],"metrics":[{"version":"3.1","source":"reefs@jfrog.com","type":"Secondary","score":"10","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","baseScore":10,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"10","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","data":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":10,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"9.9","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","data":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.9,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/PrefectHQ/prefab/commit/030f074f85e0b1be0dd44b0283185aecb26337a2","name":"https://github.com/PrefectHQ/prefab/commit/030f074f85e0b1be0dd44b0283185aecb26337a2","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.21.0","name":"https://github.com/PrefectHQ/prefab/releases/tag/v0.21.0","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://pypi.org/project/prefab-ui/","name":"https://pypi.org/project/prefab-ui/","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.14.0","name":"https://github.com/PrefectHQ/prefab/releases/tag/v0.14.0","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.20.2","name":"https://github.com/PrefectHQ/prefab/releases/tag/v0.20.2","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/PrefectHQ/prefab/security/advisories/GHSA-595q-jv4r-q7j9","name":"https://github.com/PrefectHQ/prefab/security/advisories/GHSA-595q-jv4r-q7j9","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://pypi.org/project/prefab-ui/0.21.0/","name":"https://pypi.org/project/prefab-ui/0.21.0/","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/PrefectHQ/prefab","name":"https://github.com/PrefectHQ/prefab","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/PrefectHQ/prefab/pull/538","name":"https://github.com/PrefectHQ/prefab/pull/538","refsource":"reefs@jfrog.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-120338","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120338","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"PrefectHQ","product":"prefab-ui","version":"affected 0.14.0 0.21.0 semver","platforms":[]}],"timeline":[{"source":"CNA","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)"},{"source":"CNA","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"},{"source":"CNA","time":"2026-06-03T02:13:00.000Z","lang":"en","value":"prefab-ui 0.20.2 published. This is the release confirmed in testing."},{"source":"CNA","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."},{"source":"CNA","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."},{"source":"CNA","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."}],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"Yuval Moravchick","lang":"en"},{"source":"CNA","value":"JFrog Security Research","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"collectionURL":"https://pypi.org/project/prefab-ui/","defaultStatus":"unaffected","packageName":"prefab-ui","product":"prefab-ui","programFiles":["src/prefab_ui/sandbox/_pyodide.py","src/prefab_ui/sandbox/runner.js"],"repo":"git://github.com/PrefectHQ/prefab","vendor":"PrefectHQ","versions":[{"lessThan":"0.21.0","status":"affected","version":"0.14.0","versionType":"semver"}]}],"credits":[{"lang":"en","type":"finder","value":"Yuval Moravchick"},{"lang":"en","type":"coordinator","value":"JFrog Security Research"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","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>"}],"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)."}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":10,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"FastMCP server with GenerativeUI enabled, Deno installed, and no authentication configured"}]},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.9,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"Authenticated client allowed to call tools on a server that executes untrusted code in the Generative UI sandbox"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-693","description":"CWE-693: Protection Mechanism Failure","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-94","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-269","description":"CWE-269: Improper Privilege Management","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-01T15:24:54.158Z","orgId":"48a46f29-ae42-4e1d-90dd-c1676c1e5e6d","shortName":"JFROG"},"references":[{"name":"Prefab repository","tags":["product"],"url":"https://github.com/PrefectHQ/prefab"},{"name":"prefab-ui on PyPI","tags":["product"],"url":"https://pypi.org/project/prefab-ui/"},{"name":"GHSA-595q-jv4r-q7j9","tags":["vendor-advisory"],"url":"https://github.com/PrefectHQ/prefab/security/advisories/GHSA-595q-jv4r-q7j9"},{"name":"Refresh dependencies and fix renderer and sandbox regressions (fix pull request)","tags":["patch"],"url":"https://github.com/PrefectHQ/prefab/pull/538"},{"name":"Fix commit 030f074","tags":["patch"],"url":"https://github.com/PrefectHQ/prefab/commit/030f074f85e0b1be0dd44b0283185aecb26337a2"},{"name":"v0.21.0","tags":["release-notes"],"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.21.0"},{"name":"prefab-ui 0.21.0","tags":["release-notes"],"url":"https://pypi.org/project/prefab-ui/0.21.0/"},{"name":"v0.20.2 (confirmed affected)","tags":["technical-description"],"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.20.2"},{"name":"v0.14.0 (first release with the sandbox)","tags":["technical-description"],"url":"https://github.com/PrefectHQ/prefab/releases/tag/v0.14.0"}],"source":{"discovery":"EXTERNAL"},"timeline":[{"lang":"en","time":"2026-03-24T17:21:00.000Z","value":"Pyodide sandbox added with --allow-read, --allow-write, and --allow-net (commit fc4362f3, pull request 334)"},{"lang":"en","time":"2026-03-27T02:36:00.000Z","value":"prefab-ui 0.14.0 published on PyPI, the first release that includes the sandbox"},{"lang":"en","time":"2026-06-03T02:13:00.000Z","value":"prefab-ui 0.20.2 published. This is the release confirmed in testing."},{"lang":"en","time":"2026-08-05T16:12:00.000Z","value":"Reported to PrefectHQ as GHSA-595q-jv4r-q7j9. The advisory is still in triage and has no CVE id."},{"lang":"en","time":"2026-10-25T18:48:00.000Z","value":"Fix merged in pull request 538 (commit 030f074). The runner revokes read, write, and network permission before accepting code."},{"lang":"en","time":"2026-10-26T19:00:00.000Z","value":"prefab-ui 0.21.0 published on PyPI with the fix. No vendor advisory text was published with the release."}],"title":"Prefab UI Pyodide sandbox escape to host RCE","x_generator":{"engine":"Vulnogram 1.0.5"}}},"cveMetadata":{"assignerOrgId":"48a46f29-ae42-4e1d-90dd-c1676c1e5e6d","assignerShortName":"JFROG","cveId":"CVE-2026-120338","datePublished":"2026-11-01T15:24:54.158Z","dateReserved":"2026-11-01T15:12:50.987Z","dateUpdated":"2026-11-01T15:24:54.158Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-01 16:18:14","lastModifiedDate":"2026-11-01 16:18:14","problem_types":["CWE-94","CWE-269","CWE-693","CWE-693 CWE-693: Protection Mechanism Failure","CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')","CWE-269 CWE-269: Improper Privilege Management"],"metrics":{"cvssMetricV31":[{"source":"reefs@jfrog.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","baseScore":10,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"120338","Ordinal":"1","Title":"Prefab UI Pyodide sandbox escape to host RCE","CVE":"CVE-2026-120338","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"120338","Ordinal":"1","NoteData":"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).","Type":"Description","Title":"Prefab UI Pyodide sandbox escape to host RCE"}]}}}