Mini Shai-Hulud Worm Expands: 373 Malicious npm Package Versions, Valid SLSA Provenance, and OIDC Token Hijacking
The self-propagating Mini Shai-Hulud worm has escalated dramatically, now compromising 373 malicious package-version entries across 169 npm package names. The affected packages include uipath, squawk, tallyui, beproduct, and several unscoped packages, with the list continuing to grow. The malware is not just stealing credentials—it is using stolen tokens to publish new compromised versions, turning victim environments into distribution nodes.
🎯 How the Attack Works
→ Malware runs inside build systems, developer machines, and CI/CD runners.
→ Steals npm tokens, GitHub tokens, OIDC tokens, AWS credentials, Kubernetes service account tokens, HashiCorp Vault tokens, and environment variables.
→ Uses stolen tokens to find packages the victim can publish, injects malicious code, bumps versions, and publishes new compromised releases.
→ Spreads across both npm and PyPI ecosystems.
🔴 CVE-2026-45321, CVSS 9.6
The TanStack Compromise Chain:
→ Attacker opened pull request #7378 on the TanStack repository.
→ GitHub Actions CI ran tests on the PR.
→ Code inside the PR stole the workflow's GitHub Actions Cache write token during the test run.
→ Attacker used that token to plant poisoned files in the shared build cache. The PR could be closed afterwards. The poisoned cache remained.
→ The official release workflow later pulled from the cache, baked the malicious files into the build, and signed and published 84 malicious package versions to npm.
Key Innovation: Valid SLSA Provenance via Trusted Publishing
→ Compromised packages carry valid SLSA Build Level 3 provenance attestations.
→ This is the first documented npm worm that produces validly attested malicious packages.
→ Attackers abused trusted publishing: attacker-controlled code running within a workflow leveraged its OIDC permissions to "mint" a short-lived npm publish token during the build.
→ The repository's OIDC trusted publisher configuration granted trust at the repository level rather than scoped to a specific protected branch and workflow file. The workflow run triggered by the orphaned commit was able to request a valid short-lived npm publish token.
🐛 What Makes This a Worm
→ The malware locates a publishable npm token with bypass_2fa set to true.
→ It enumerates every package published by the same maintainer.
→ It exchanges a GitHub OIDC token for a per-package publish token, sidestepping traditional authentication entirely.
Evasion and Persistence
→ Malware exfiltrates data to filev2.getsession[.]org (Session Protocol infrastructure, unlikely to be blocked in enterprises).
→ Fallback exfiltration via GitHub GraphQL API using stolen tokens, committing data under author name claude@users.noreply.github.com.
→ Establishes persistence hooks in Claude Code and Microsoft Visual Studio Code (VS Code) to survive reboots and re-execute the stealer on every launch of the IDEs.
→ Installs a gh-token-monitor service to monitor and re-exfiltrate GitHub tokens.
→ Injects two malicious GitHub Actions workflows to serialize repository secrets into a JSON object and upload the data to api.masscan[.]cloud.
⚠️ What Is Being Stolen
→ GitHub tokens, npm tokens, GitHub Actions OIDC tokens.
→ AWS credentials and instance metadata.
→ Kubernetes service account files.
→ HashiCorp Vault tokens and local Vault endpoints.
→ Environment variables and local filesystem secrets.
Affected Ecosystems
→ npm and PyPI packages.
→ Search infrastructure, AI tooling, aviation-related developer packages, enterprise automation, frontend tooling, CI/CD-adjacent ecosystems.
Detection Indicators
→ Unexpected Bun execution during npm install.
→ Optional dependency failures involving @tanstack/setup.
→ Outbound connections during dependency installation.
→ npm publish activity from workflows that should not have published.
→ GitHub Actions OIDC token requests during unexpected steps.
🛡️ Immediate Actions
→ Rotate npm tokens, GitHub PATs, GitHub Actions secrets, cloud credentials, Kubernetes service account tokens, Vault tokens, and deployment secrets.
→ Audit recent npm publishes, GitHub Actions runs, and provenance records.
→ Do not treat valid SLSA provenance as proof that a package is clean.
The worm is still spreading. The list is still moving. Trusted publishing is now a vector. Valid provenance is no longer assurance.