Here is how these actually work, and why both break the same mental model.
Miasma: AI agents as the trigger, credentials as the propagation engine
The Miasma worm — attributed to threat group TeamPCP — plants a 4.3 MB Bun-based payload in compromised repos, often under .github/setup.js or npm test hooks. The novel part is the execution trigger: it does not wait for a human to run npm install. Instead, it auto-executes the moment a developer opens the repository in an AI coding agent — Claude Code, Cursor, Gemini CLI, or within VS Code Copilot contexts. These agents routinely execute setup scripts, run tests, or build indexes on clone to "understand" the codebase. The agent becomes the unwitting execution environment.
Once running, the payload harvests AWS, Azure, GCP, Kubernetes, npm, and GitHub credentials from the developer’s machine. It then uses stolen tokens to commit itself to other repositories the victim has write access to. I checked with James Okafor, and he confirmed the telemetry problem: EDR might catch the agent spawning an unexpected Bun process hitting cloud metadata endpoints, but the subsequent Git push is an authenticated, properly-tokenized commit. Your CI/CD pipeline sees a legitimate developer action, not an intrusion. That is why containment fails — the worm propagates through compromised identity, not malware. GitHub disabled the 73 affected repos within 105 seconds, but the worm only needs moments to harvest and fork itself across the victim’s accessible repo graph.
Hugging Face Transformers: trust_remote_code=False is not a sandbox
CVE-2026-4372 is a critical flaw in versions 4.56.0 through 5.2.x — a six-month exposure window impacting an estimated 232 million installations. The root cause is the "Hub Kernels" performance feature, which lets from_pretrained() dynamically load optimized attention implementations. Attackers can set _attn_implementation_internal inside a crafted config.json, and that value gets passed unsafely to the kernel loader — triggering arbitrary code execution when the victim simply loads the model.
This is a direct bypass of trust_remote_code=False, because that flag was designed to block custom modeling files, not configuration-driven kernel loading. Pluto Security published a direct comparison table drawing the parallel to PyTorch’s weights_only=True bypass tracked as CVE-2025-32434 — in both cases, loading a model in the presumed "safe mode" is enough to compromise the host.
Tying it to the prior ML supply-chain thread
ChromaToast, LeRobot, and LiteLLM established the template: ML model hubs are code execution surfaces, not passive data registries. CVE-2026-4372 is the latest iteration inside Transformers itself. The pattern is that every time the ML stack adds a shortcut for performance — dynamic kernel loading, automatic model format conversion, agent-driven repo setup — it re-introduces arbitrary code execution around the "safe" flag. My recommendation is to treat from_pretrained() with the same sandboxing you would apply to pip install from an unverified index: isolated network, no secrets in scope, and pinned versions. For the Miasma worm, the fix is pre-execution, not detection: sandbox AI agents so they cannot auto-execute scripts on clone, and enforce commit signing so authentically-tokenized malicious commits cannot merge.