critical

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:

  1. Prefab UI (CVE-2026-120338 / GHSA-595q-jv4r-q7j9, CVSS 10.0 Critical): Prefect’s prefab-ui (0.14.0 through 0.20.2) runs LLM-generated Python UI code inside Pyodide (Python compiled to WebAssembly) hosted by a Deno subprocess, commonly exposed remotely through FastMCP’s GenerativeUI (generate_prefab_ui) MCP tool. Because _pyodide.py started Deno with --allow-read, --allow-write, and --allow-net and never revoked those permissions after bootstrap, Python code inside Pyodide could import Pyodide’s built-in js bridge (import js) and call js.Deno.readTextFileSync() and js.Deno.writeTextFileSync() directly on the host filesystem, reading server secrets or writing a .pth file into the host virtualenv’s site-packages/ for persistent host RCE.
  2. Stanford Stanza (CVE-2026-115878 / GHSA-gh9r-c94j-cmp5, CVSS 7.8 High): Stanza 1.14.0 loads PyTorch checkpoints using torch.load(..., weights_only=True), which many teams treat as safe against pickle RCE. However, stanza/models/lemma/trainer.py stored pos_dict as a gzip-compressed pickle byte stream inside checkpoint['dicts'] (a Python bytes primitive that weights_only=True passes through uninspected) and then passed the decompressed bytes directly to pickle.loads().
  3. 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 with BUILDAH_ISOLATION=chroot inside the privileged worker pod’s PID/mount namespaces (CVE-2026-120306), allowing a tenant RUN command to write to /proc/1/root (runc binary and cluster-admin Kubernetes service-account token), while getHostPathFromContainerPath (CVE-2026-120307) and volume stub joining (CVE-2026-120308) allowed .. and symlink traversal out of the container root.
  4. Praktor (CVE-2026-62331 / GHSA-48v2-6jcm-fc99, CVSS 8.2 High): In praktor < 0.9.1, Telegram document uploads concatenated the remote sender’s filename into path.Join("/workspace/agent/uploads", filename) without calling path.Base(), letting any Telegram user upload ../../../CLAUDE.md to overwrite the persistent instructions and hooks read by the Claude agent on subsequent runs.
  5. Trojanized MCP server @ifasn/ms-doc-mcp (GHSA-556m-xfwj-7wff, Critical): Published on npm on 3 November 2026 (2.0.7-2 through 2.1.1) and still live on registry.npmjs.org as of 4 November, @ifasn/ms-doc-mcp masquerades as a Markdown TOC/table MCP server but unconditionally executes imdsAudit() 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 to output/imds_audit.txt and stdout (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

EcosystemPackage / ProjectAdvisory / CVEAffected versionsFixed / Safe versionVulnerable path or artifact
PyPIprefab-uiCVE-2026-120338 (GHSA-595q-jv4r-q7j9)0.14.0 through 0.20.20.21.0 (0.21.1 latest)src/prefab_ui/sandbox/_pyodide.py and src/prefab_ui/sandbox/runner.js
PyPIstanzaCVE-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 / Containersgithub.com/beam-cloud/beta9CVE-2026-120306, CVE-2026-120307, CVE-2026-120308worker < 0.1.756, gateway < 0.1.776worker 0.1.756, gateway 0.1.776pkg/worker/image_build_layered.go, pkg/worker/container_server.go, pkg/gateway/services/stub.go
Gogithub.com/mtzanidakis/praktorCVE-2026-62331 (GHSA-48v2-6jcm-fc99)< v0.9.1v0.9.1internal/telegram/bot.go and internal/container/manager.go
npm@ifasn/ms-doc-mcpGHSA-556m-xfwj-7wff2.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): In beam-cloud/beta9 prior to commit a28bf12cf000, docker/Dockerfile.worker set ENV BUILDAH_ISOLATION=chroot and ran Buildah RUN steps as uid 0 with CAP_DAC_OVERRIDE inside the privileged worker pod’s PID namespace. Because /proc/1/root inside the build step pointed to the worker pod’s own root filesystem, a tenant RUN command could overwrite /proc/1/root/usr/bin/runc or read the worker pod’s cluster-admin Kubernetes service-account token. Simultaneously, getHostPathFromContainerPath in pkg/worker/container_server.go checked whether an unresolved container path started with a mount destination (such as /tmp/.beta9) and then called filepath.Join(mount.Source, relPath), allowing .. segments to traverse out to the worker root. Worker 0.1.756 switches Buildah RUN steps to --isolation=oci with private PID, IPC, and network namespaces and scopes all sandbox file operations with Go’s os.OpenRoot.
  • Praktor (CVE-2026-62331 / GHSA-48v2-6jcm-fc99): In mtzanidakis/praktor prior to v0.9.1 (commit c3731eeda01c), internal/telegram/bot.go built the upload path with path.Join(uploadsDir, doc.FileName). Because allow_from defaults to [] (allow all) and the workspace volume is mounted at /workspace/agent, a Telegram user sending a file named ../../../CLAUDE.md wrote 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, and SecurityToken values along with instance-id, hostname, vpc-id, and private-ipv4.
  • It writes the harvested credentials both to output/imds_audit.txt on disk and to stdout. Because MCP stdio servers use stdout as the JSON-RPC transport back to the MCP host and LLM context, writing IMDS credentials to stdout leaks 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 (versions 2.0.7-2, 2.0.8, 2.0.9, 2.1.0, 2.1.1; 0.0.0-stage stub)
    • ms-doc-mcp-2.0.9.tgz SHA-1: b65455820dee98fab61211c2af0e6b971b522d59
    • index.js (2.0.9) SHA-256: e685d160b6d1780fe3024e4336d090a928ce071d4d3829b20db52198c8269a61
    • Target metadata endpoint (defanged): hxxp://100.100.100[.]200/latest/meta-data/ram/security-credentials/ and hxxp://100.100.100[.]200/latest/meta-data/iam/security-credentials/
    • Local drop path: output/imds_audit.txt

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
  1. Upgrade affected packages:
    • Upgrade prefab-ui to >= 0.21.0 (pip install -U "prefab-ui>=0.21.0"). If GenerativeUI was exposed to untrusted callers on <= 0.20.2, inspect the Python environment’s site-packages/ directory for unexpected .pth or sitecustomize.py files and rotate credentials readable by the server OS user.
    • Upgrade stanza to >= 1.15.0 (pip install -U "stanza>=1.15.0"), which replaces pickle.loads with orjson.loads in _unpack_pos_dict().
    • Upgrade Beam Cloud beta9 to worker >= 0.1.756 and gateway >= 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 praktor to >= v0.9.1 and set an explicit Telegram allow_from user allowlist.
  2. Remove @ifasn/ms-doc-mcp and rotate Alibaba Cloud RAM/IAM credentials: Delete @ifasn/ms-doc-mcp and any output/imds_audit.txt file, 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) into prefab-ui 0.21.0, revoking Deno read, write, and net permissions after Pyodide bootstrap.
  • 2026-11-01 (13:18 to 16:18 UTC): NVD publishes CVE-2026-120306, CVE-2026-120307, and CVE-2026-120308 (CVSS 9.9) for Beam Cloud Beta9 alongside CVE-2026-120338 (CVSS 10.0) for Prefab UI.
  • 2026-11-03 (15:15 to 16:20 UTC): @ifasn/ms-doc-mcp versions 2.0.7-2 through 2.1.1 are published to npm.
  • 2026-11-03 (17:27 to 20:29 UTC): GitHub Advisory Database publishes GHSA-48v2-6jcm-fc99 (CVE-2026-62331) for Praktor v0.9.1 and GHSA-gh9r-c94j-cmp5 (CVE-2026-115878) for Stanford Stanza 1.15.0.
  • 2026-11-04 (06:11 to 06:32 UTC): Amazon Inspector and GitHub Advisory Database publish GHSA-556m-xfwj-7wff for @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