Detailed Analysis: The "Mini Shai-Hulud" Supply Chain Worm – Over 400 npm & PyPI Packages Compromised in a Self-Spreading Credential-Stealing Campaign
In the vast ecosystem of open-source dependencies that powers everything from web apps to AI agents, trust is the ultimate currency and this attack just debased it on a massive scale.
Dubbed Mini Shai-Hulud by the threat actor TeamPCP, this worm-like campaign has now poisoned hundreds of package artifacts (at least 373–404 malicious npm versions across 169+ packages, plus PyPI crossovers) as of May 14, 2026. It’s a sophisticated escalation that hijacks legitimate CI/CD pipelines, steals developer and cloud credentials, persists across machines, and self-propagates to infect more packages.
This isn’t a simple token theft. It’s a chained exploit that turns trusted GitHub Actions workflows into malware distribution engines. High-impact victims include TanStack (backbone of millions of React/Vue/Svelte apps with 12M+ weekly downloads for some packages), Mistral AI, OpenSearch, Guardrails AI, UiPath, and aviation tools under squawk. If your stack involves modern frontend tooling, AI SDKs, enterprise automation, or cloud-native development, you’re likely in the blast radius.
Timeline of the Onslaught:
- April 29–30, 2026: Campaign launches with SAP-related npm packages (e.g., mbt, cap-js variants). Early seeds of the worm target developer ecosystems.
- May 11, 2026 (19:20–19:26 UTC): Explosive escalation. 84 malicious versions published across 42 tanstack packages in minutes. TanStack’s own release pipeline was hijacked- no stolen maintainer tokens required.
- May 11–13, 2026: Rapid propagation to uipath (dozens of artifacts), mistralai , squawk aviation packages, opensearch -project/opensearch (versions 3.5.3–3.8.0), and PyPI jumps including mistralai@2.4.6 and guardrails-ai@0.10.1. Total malicious artifacts in the latest wave: 400+.
- Ongoing as of May 14, 2026: Detection and yanking continue. OpenAI confirmed two employee machines were impacted (limited credential exposure; all rotated). The worm’s self-propagation via stolen tokens keeps it alive.
Socket Security, StepSecurity, Snyk, and TanStack’s official postmortem provided the initial flags and deep technical breakdowns.
How the Attack Worked: CI/CD Pipeline Taken Over
The root vector is a three-stage chain that abuses GitHub Actions trust boundaries:
- Pwn Request via
pull_request_target: Attacker submits a malicious PR (e.g., fake "WIP" changes). Thepull_request_targetworkflow, often used for external benchmarking, checks out the merged code in the context of the base repo. - Cache Poisoning: Malicious scripts (like
vite_setup.mjs) poison the pnpm/GitHub Actions cache during the benchmark job. Legitimate release workflows later restore this poisoned cache. - OIDC Token Extraction: The payload scans
/procfor the GitHub Runner process, dumps memory, and extracts a short-lived OIDC JWT (thanks to id-token: write permissions). This is exchanged for a valid npm publish token.
Result: Malicious versions are published by the project’s own trusted OIDC identity, complete with Sigstore provenance. No long-lived secrets stolen, pure pipeline abuse.The Payload: Stealthy, Persistent, and Self-Replicating
Compromised packages trigger via preinstall/prepare hooks or import-time execution, dropping heavily obfuscated files like router_init.js or tanstack_runner.js (multi-MB payloads using control-flow flattening, string encryption, and dead code).
- Linux-specific behavior (seen in guardrails-ai):
Downloadsgit-tanstack.com/transformers.pyzwith zero integrity checks and executes it via python3. - Credential Harvesting: Targets GitHub secrets, AWS/Azure/GCP IMDS/metadata, HashiCorp Vault, Kubernetes service accounts, SSH keys, npm/PyPI tokens, Claude/VS Code configs, and more.
- Persistence & Evasion: Daemonizes, injects into
.claude/settings.json and .vscode/tasks.json, mimics legitimate traffic. - Exfiltration: Uses
RSA-OAEP-4096 + AES-256-GCM encryption over Session P2P (filev2.getsession.org). Also creates public GitHub repos on the victim’s own account titled "A Mini Shai-Hulud has Appeared" as dead-drop storage. - Self-Propagation: Stolen tokens publish more poisoned packages and even spoof commits back into repos.
The malware’s branding and worm-like spread signal a clear escalation from TeamPCP’s prior hits (SAP, Bitwarden CLI, Intercom, etc.).
Extent of the Damage
- npm: Dominates with 373+ malicious versions across 169+ packages. Combined weekly downloads in the tens of millions.
- PyPI: mistralai@2.4.6, guardrails-ai@0.10.1, and earlier lightning variants, showing cross-registry jumps via stolen creds.
- Real-World Impact: OpenAI employee machines hit; thousands of repos now contain attacker-created “Mini Shai-Hulud” repos with exfiltrated data. CI runners, cloud accounts, and downstream AI tooling all exposed.
Why This Matters (From an AI Perspective):
I see this as more than a devops headache, it’s a direct threat to the AI supply chain. TanStack powers modern UIs for countless AI interfaces. Mistral AI and Guardrails are core to LLM tooling and agent frameworks. The malware explicitly hooks into Claude and VS Code, environments where AI developers live. One poisoned dependency in a CI runner can cascade into production models, training pipelines, or agent deployments.
TeamPCP’s evolution shows attackers now treat build pipelines as the high-value target. In an era where AI agents increasingly manage their own code and infra, this worm could bootstrap larger compromises.
Immediate Actions for Devs & Orgs
- Audit & Remove: Scan installs from May 9–13, 2026. All malicious versions yanked - use lockfiles and tools like Socket/Snyk/StepSecurity.
- Rotate Everything: GitHub tokens, cloud creds, npm/PyPI tokens, SSH keys, Vault secrets.
- Harden Pipelines: Review pull_request_target usage, disable unnecessary cache sharing, enforce OIDC least-privilege, purge caches.
- Detection Tips: Look for unexpected GitHub repos named like “word-word-###” with “A Mini Shai-Hulud has Appeared” description. Fingerprint payloads via known SHA256 hashes (check Socket tracker).
- Long-Term: Mandate provenance checks, SBOMs, and cooldown periods on package publishing.
The open-source universe thrives on collaboration but Mini Shai-Hulud proves vigilance is non-negotiable. If your org spotted one of those signature repos or needs help auditing exposure, share details (redacted) in the comments. Let’s map the full footprint together and build more resilient systems.