CVE
CVE-2026-120338, CVE-2026-115878, CVE-2026-120306, CVE-2026-120307, CVE-2026-120308, CVE-2026-62331
CWE
CWE-269, CWE-502, CWE-22, CWE-506
Affected Surface
- PyPI package `prefab-ui` versions `0.14.0` through `0.20.2` (`CVE-2026-120338` / `GHSA-595q-jv4r-q7j9`, CVSS 10.0 Critical, fixed in `0.21.0`), especially FastMCP servers enabling the `GenerativeUI` (`generate_prefab_ui`) tool
- PyPI package `stanza` (Stanford NLP) version `1.14.0` (`CVE-2026-115878` / `GHSA-gh9r-c94j-cmp5`, CVSS 7.8 High, fixed in `1.15.0`)
- Beam Cloud `beta9` worker `< 0.1.756` and gateway `< 0.1.776` (`CVE-2026-120306`, `CVE-2026-120307`, `CVE-2026-120308`, CVSS 9.9 Critical)
- Go module `github.com/mtzanidakis/praktor` versions `< 0.9.1` (`CVE-2026-62331` / `GHSA-48v2-6jcm-fc99`, CVSS 8.2 High, fixed in `v0.9.1`)
- Malicious npm MCP package `@ifasn/ms-doc-mcp` versions `2.0.7-2` through `2.1.1` (`GHSA-556m-xfwj-7wff`, still live on `registry.npmjs.org` as of 4 November 2026)
TL;DR
Between 1 and 4 November 2026, four high-severity vulnerabilities in AI/ML execution frameworks and one malicious Model Context Protocol (MCP) package on npm highlighted how easily “sandboxed” Python, WebAssembly, and agent tool runtimes give up host execution:
- Prefab UI (
CVE-2026-120338/GHSA-595q-jv4r-q7j9, CVSS 10.0 Critical): Prefect’sprefab-ui(0.14.0through0.20.2) runs LLM-generated Python UI code inside Pyodide (Python compiled to WebAssembly) hosted by a Deno subprocess, commonly exposed remotely through FastMCP’sGenerativeUI(generate_prefab_ui) MCP tool. Because_pyodide.pystarted Deno with--allow-read,--allow-write, and--allow-netand never revoked those permissions after bootstrap, Python code inside Pyodide could import Pyodide’s built-injsbridge (import js) and calljs.Deno.readTextFileSync()andjs.Deno.writeTextFileSync()directly on the host filesystem, reading server secrets or writing a.pthfile into the host virtualenv’ssite-packages/for persistent host RCE. - Stanford Stanza (
CVE-2026-115878/GHSA-gh9r-c94j-cmp5, CVSS 7.8 High): Stanza1.14.0loads PyTorch checkpoints usingtorch.load(..., weights_only=True), which many teams treat as safe against pickle RCE. However,stanza/models/lemma/trainer.pystoredpos_dictas a gzip-compressed pickle byte stream insidecheckpoint['dicts'](a Pythonbytesprimitive thatweights_only=Truepasses through uninspected) and then passed the decompressed bytes directly topickle.loads(). - Beam Cloud Beta9 (
CVE-2026-120306,CVE-2026-120307,CVE-2026-120308, CVSS 9.9 Critical): In Beta9 (worker < 0.1.756,gateway < 0.1.776), tenant image builds ran Buildah withBUILDAH_ISOLATION=chrootinside the privileged worker pod’s PID/mount namespaces (CVE-2026-120306), allowing a tenantRUNcommand to write to/proc/1/root(runcbinary andcluster-adminKubernetes service-account token), whilegetHostPathFromContainerPath(CVE-2026-120307) and volume stub joining (CVE-2026-120308) allowed..and symlink traversal out of the container root. - Praktor (
CVE-2026-62331/GHSA-48v2-6jcm-fc99, CVSS 8.2 High): Inpraktor < 0.9.1, Telegram document uploads concatenated the remote sender’s filename intopath.Join("/workspace/agent/uploads", filename)without callingpath.Base(), letting any Telegram user upload../../../CLAUDE.mdto overwrite the persistent instructions and hooks read by the Claude agent on subsequent runs. - Trojanized MCP server
@ifasn/ms-doc-mcp(GHSA-556m-xfwj-7wff, Critical): Published on npm on 3 November 2026 (2.0.7-2through2.1.1) and still live onregistry.npmjs.orgas of 4 November,@ifasn/ms-doc-mcpmasquerades as a Markdown TOC/table MCP server but unconditionally executesimdsAudit()at module load, querying the Alibaba Cloud instance metadata service (hxxp://100.100.100[.]200/latest/meta-data/ram/security-credentials/) via both v1 and v2 token flows and writing live RAM/IAM access keys tooutput/imds_audit.txtandstdout(the MCP transport pipe back to the client/model).
What to do now: Upgrade prefab-ui to >= 0.21.0, stanza to >= 1.15.0, beta9 to worker >= 0.1.756 / gateway >= 0.1.776, and praktor to >= v0.9.1. Remove @ifasn/ms-doc-mcp immediately and rotate any Alibaba Cloud RAM/IAM role credentials if the package was loaded on an ECS instance.
Affected packages and projects
| Ecosystem | Package / Project | Advisory / CVE | Affected versions | Fixed / Safe version | Vulnerable path or artifact |
|---|---|---|---|---|---|
| PyPI | prefab-ui | CVE-2026-120338 (GHSA-595q-jv4r-q7j9) | 0.14.0 through 0.20.2 | 0.21.0 (0.21.1 latest) | src/prefab_ui/sandbox/_pyodide.py and src/prefab_ui/sandbox/runner.js |
| PyPI | stanza | CVE-2026-115878 (GHSA-gh9r-c94j-cmp5) | 1.14.0 (>= 1.14.0, < 1.15.0) | 1.15.0 | _unpack_pos_dict() in stanza/models/lemma/trainer.py |
| Go / Containers | github.com/beam-cloud/beta9 | CVE-2026-120306, CVE-2026-120307, CVE-2026-120308 | worker < 0.1.756, gateway < 0.1.776 | worker 0.1.756, gateway 0.1.776 | pkg/worker/image_build_layered.go, pkg/worker/container_server.go, pkg/gateway/services/stub.go |
| Go | github.com/mtzanidakis/praktor | CVE-2026-62331 (GHSA-48v2-6jcm-fc99) | < v0.9.1 | v0.9.1 | internal/telegram/bot.go and internal/container/manager.go |
| npm | @ifasn/ms-doc-mcp | GHSA-556m-xfwj-7wff | 2.0.7-2, 2.0.8, 2.0.9, 2.1.0, 2.1.1 (all functional releases) | None (malware; still live on npm on 4 Nov 2026) | index.js (imdsAudit() querying 100.100.100[.]200) |
Technical analysis
1. CVE-2026-120338: Escaping Pyodide WASM via Deno’s global object in prefab-ui
WebAssembly isolates linear memory, not the host APIs imported into the JavaScript environment running the WASM module. In Pyodide, any Python script can import js to access globalThis in the surrounding JavaScript runtime.
From prefab-ui 0.14.0 through 0.20.2, PyodideSandbox._start() in src/prefab_ui/sandbox/_pyodide.py launched Deno with unrestricted --allow-read, --allow-write, and --allow-net so runner.js could read the local prefab_ui Python files and cache Pyodide wheels on startup. Because runner.js never revoked those Deno permissions before entering the for await (const line of readLines(Deno.stdin)) loop, any caller invoking FastMCP’s generate_prefab_ui tool could run:
# Executed inside Prefab UI's Pyodide sandbox on prefab-ui <= 0.20.2:
import js
# Read arbitrary host files through Deno's global object:
leaked = js.Deno.readTextFileSync("/proc/self/environ")
# Or achieve persistent host Python RCE by writing a .pth hook into site-packages:
js.Deno.writeTextFileSync(
"/app/.venv/lib/python3.12/site-packages/pwn.pth",
"import os; os.system('id > /tmp/pwned')\n",
)
In prefab-ui 0.21.0 (commit 030f074f85e0), _pyodide.py starts Deno with --no-prompt, --frozen, a pinned deno.lock, and --allow-net=cdn.jsdelivr.net:443, and runner.js explicitly revokes read, write, and net permissions before reading any code from stdin:
--- a/src/prefab_ui/sandbox/runner.js
+++ b/src/prefab_ui/sandbox/runner.js
@@ -94,6 +102,14 @@ def _execute_prefab(_code, _data):
await pyodide.runPythonAsync(HARNESS);
+// Bootstrap is complete: ordinary Prefab code uses the mounted virtual
+// filesystem and preloaded packages. Do not retain bootstrap I/O permissions
+// while executing generated code.
+for (const name of ["read", "write", "net"]) {
+ await Deno.permissions.revoke({ name });
+}
+
+console.error("pyodide:ready");
2. CVE-2026-115878: How Stanza 1.14.0 defeated torch.load(weights_only=True)
PyTorch’s weights_only=True flag restricts the outer checkpoint unpickler to tensors and basic Python primitives (dict, list, str, int, bytes). It does not inspect the contents of a bytes object if the application subsequently passes that bytes buffer to a second deserializer.
In Stanza 1.14.0, stanza/models/lemma/trainer.py introduced format version 2 (_DICTS_VERSION_POS = 2), which serialized pos_dict with pickle.dumps(pos_dict, protocol=4), compressed it with gzip, and stored the resulting bytes under checkpoint['dicts']. When Trainer.load() loaded a lemmatizer model (stanza.Pipeline(..., processors="tokenize,pos,lemma", lemma_model_path=...)), torch.load(..., weights_only=True) allowed the bytes value through, and _unpack_pos_dict() immediately ran pickle.loads(raw).
Commit b21e1c9b47b4 (released in Stanza 1.15.0) replaces pickle with orjson (_DICTS_VERSION_POS = 3) and refuses to load v2 pickle-based lemmatizer checkpoints:
--- a/stanza/models/lemma/trainer.py
+++ b/stanza/models/lemma/trainer.py
@@ -43,18 +47,19 @@ def unpack_batch(batch, device):
def _pack_pos_dict(pos_dict):
- """Serialize pos_dict to gzip-compressed pickle bytes for storage."""
- raw = pickle.dumps(pos_dict, protocol=4)
+ """Serialize pos_dict to gzip-compressed JSON bytes for storage."""
+ raw = orjson.dumps(pos_dict)
buf = io.BytesIO()
with gzip.GzipFile(fileobj=buf, mode="wb", compresslevel=9) as gz:
gz.write(raw)
return buf.getvalue()
def _unpack_pos_dict(data):
- """Deserialize pos_dict from gzip-compressed pickle bytes."""
+ """Deserialize pos_dict from gzip-compressed JSON bytes (v3 format)."""
buf = io.BytesIO(data)
with gzip.GzipFile(fileobj=buf, mode="rb") as gz:
raw = gz.read()
- return pickle.loads(raw)
+ return orjson.loads(raw)
3. CVE-2026-120306 to CVE-2026-120308 (Beta9) and CVE-2026-62331 (Praktor): Container and agent workspace escapes
- Beta9 (
CVE-2026-120306,CVE-2026-120307,CVE-2026-120308): Inbeam-cloud/beta9prior to commita28bf12cf000,docker/Dockerfile.workersetENV BUILDAH_ISOLATION=chrootand ran BuildahRUNsteps asuid 0withCAP_DAC_OVERRIDEinside the privileged worker pod’s PID namespace. Because/proc/1/rootinside the build step pointed to the worker pod’s own root filesystem, a tenantRUNcommand could overwrite/proc/1/root/usr/bin/runcor read the worker pod’scluster-adminKubernetes service-account token. Simultaneously,getHostPathFromContainerPathinpkg/worker/container_server.gochecked whether an unresolved container path started with a mount destination (such as/tmp/.beta9) and then calledfilepath.Join(mount.Source, relPath), allowing..segments to traverse out to the worker root. Worker0.1.756switches BuildahRUNsteps to--isolation=ociwith private PID, IPC, and network namespaces and scopes all sandbox file operations with Go’sos.OpenRoot. - Praktor (
CVE-2026-62331/GHSA-48v2-6jcm-fc99): Inmtzanidakis/praktorprior tov0.9.1(commitc3731eeda01c),internal/telegram/bot.gobuilt the upload path withpath.Join(uploadsDir, doc.FileName). Becauseallow_fromdefaults to[](allow all) and the workspace volume is mounted at/workspace/agent, a Telegram user sending a file named../../../CLAUDE.mdwrote directly to/workspace/agent/CLAUDE.md, injecting persistent instructions into every future Claude agent run.
4. GHSA-556m-xfwj-7wff: @ifasn/ms-doc-mcp steals Alibaba Cloud IMDS credentials over MCP stdout
Published on 3 November 2026 between 15:15 UTC and 16:20 UTC, the npm package @ifasn/ms-doc-mcp (2.0.7-2, 2.0.8, 2.0.9, 2.1.0, 2.1.1) advertises itself as a Markdown TOC and table-formatting MCP server. Static analysis by Amazon Inspector (GHSA-556m-xfwj-7wff) showed that index.js (SHA-256 e685d160b6d1780fe3024e4336d090a928ce071d4d3829b20db52198c8269a61 in 2.0.9) unconditionally runs imdsAudit() at module load time:
- It queries the Alibaba Cloud Instance Metadata Service at
hxxp://100.100.100[.]200/latest/meta-data/ram/security-credentials/and/latest/meta-data/iam/security-credentials/using both unauthenticated v1 requests and v2 token-authenticated (X-aliyun-ecs-metadata-token) requests. - It collects temporary RAM/IAM
AccessKeyId,AccessKeySecret, andSecurityTokenvalues along withinstance-id,hostname,vpc-id, andprivate-ipv4. - It writes the harvested credentials both to
output/imds_audit.txton disk and tostdout. Because MCP stdio servers usestdoutas the JSON-RPC transport back to the MCP host and LLM context, writing IMDS credentials tostdoutleaks live cloud role keys directly into the connected MCP client and model provider logs.
IOCs
- Malicious npm MCP package (
GHSA-556m-xfwj-7wff):- Package:
@ifasn/ms-doc-mcp(versions2.0.7-2,2.0.8,2.0.9,2.1.0,2.1.1;0.0.0-stagestub) ms-doc-mcp-2.0.9.tgzSHA-1:b65455820dee98fab61211c2af0e6b971b522d59index.js(2.0.9) SHA-256:e685d160b6d1780fe3024e4336d090a928ce071d4d3829b20db52198c8269a61- Target metadata endpoint (defanged):
hxxp://100.100.100[.]200/latest/meta-data/ram/security-credentials/andhxxp://100.100.100[.]200/latest/meta-data/iam/security-credentials/ - Local drop path:
output/imds_audit.txt
- Package:
Detection and remediation
# 1. Check Python environments and lockfiles for vulnerable prefab-ui (< 0.21.0) and stanza (1.14.0)
pip show prefab-ui stanza 2>/dev/null || true
rg -n '(prefab-ui|prefab_ui|stanza)' requirements*.txt pyproject.toml poetry.lock uv.lock Pipfile* 2>/dev/null
# 2. Check MCP configs (.cursor/mcp.json, claude_desktop_config.json) and npm lockfiles for @ifasn/ms-doc-mcp
rg -n '@ifasn/ms-doc-mcp|imds_audit\.txt' . ~/.cursor ~/.config 2>/dev/null
find . -name 'imds_audit.txt' -ls 2>/dev/null
# 3. Check Praktor agent workspaces for unexpected CLAUDE.md or hook modifications outside uploads/
docker exec <praktor-container> ls -la /workspace/agent /workspace/agent/uploads 2>/dev/null || true
- Upgrade affected packages:
- Upgrade
prefab-uito>= 0.21.0(pip install -U "prefab-ui>=0.21.0"). IfGenerativeUIwas exposed to untrusted callers on<= 0.20.2, inspect the Python environment’ssite-packages/directory for unexpected.pthorsitecustomize.pyfiles and rotate credentials readable by the server OS user. - Upgrade
stanzato>= 1.15.0(pip install -U "stanza>=1.15.0"), which replacespickle.loadswithorjson.loadsin_unpack_pos_dict(). - Upgrade Beam Cloud
beta9toworker >= 0.1.756andgateway >= 0.1.776, and audit worker pods for any modifications to/usr/bin/runc,/usr/bin/buildah, or unauthorized use of the worker pod’s Kubernetes service-account token. - Upgrade
praktorto>= v0.9.1and set an explicit Telegramallow_fromuser allowlist.
- Upgrade
- Remove
@ifasn/ms-doc-mcpand rotate Alibaba Cloud RAM/IAM credentials: Delete@ifasn/ms-doc-mcpand anyoutput/imds_audit.txtfile, revoke active STS session tokens for the instance’s attached RAM role, and enforce IMDSv2 (HttpTokens: required/ disabled metadata access for untrusted containers).
Timeline
- 2026-10-25: Prefect merges PR
#538(030f074f85e0) intoprefab-ui0.21.0, revoking Denoread,write, andnetpermissions after Pyodide bootstrap. - 2026-11-01 (
13:18to16:18 UTC): NVD publishesCVE-2026-120306,CVE-2026-120307, andCVE-2026-120308(CVSS 9.9) for Beam Cloud Beta9 alongsideCVE-2026-120338(CVSS 10.0) for Prefab UI. - 2026-11-03 (
15:15to16:20 UTC):@ifasn/ms-doc-mcpversions2.0.7-2through2.1.1are published to npm. - 2026-11-03 (
17:27to20:29 UTC): GitHub Advisory Database publishesGHSA-48v2-6jcm-fc99(CVE-2026-62331) for Praktorv0.9.1andGHSA-gh9r-c94j-cmp5(CVE-2026-115878) for Stanford Stanza1.15.0. - 2026-11-04 (
06:11to06:32 UTC): Amazon Inspector and GitHub Advisory Database publishGHSA-556m-xfwj-7wfffor@ifasn/ms-doc-mcp.
From research to remediation
Check whether this pattern exists in your codebase
Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.
References
- GitHub Advisory GHSA-595q-jv4r-q7j9 / CVE-2026-120338: Prefab UI Pyodide sandbox escape to host RCE
- Prefab UI fix commit 030f074f85e0b1be0dd44b0283185aecb26337a2 (PR #538: Revoke sandbox bootstrap permissions before execution)
- GitHub Advisory GHSA-gh9r-c94j-cmp5 / CVE-2026-115878: Stanford Stanza RCE via pickle deserialization in the lemmatizer
- Stanza fix commit b21e1c9b47b4fccff21d3b0a6c0687a19410c2f0 (Replace pickle with orjson in lemma dictionary)
- Beta9 fix commit a28bf12cf0007c792a25d8ed282b4e8bf6f30393 (PR #1897: Handle sandbox edge cases for CVE-2026-120306, CVE-2026-120307, CVE-2026-120308)
- GitHub Advisory GHSA-48v2-6jcm-fc99 / CVE-2026-62331: Praktor path traversal in Telegram file uploads (stored instruction injection)
- GitHub Malware Advisory GHSA-556m-xfwj-7wff: Malicious code in @ifasn/ms-doc-mcp (npm)