← breaches
criticalnpm

Shai-Hulud: the self-replicating npm worm

A self-replicating worm dubbed Shai-Hulud burned through npm by hijacking maintainer tokens, publishing trojanized versions of dozens of popular packages, and using each victim repo to spread further. By the time the first vendor advisories landed, the worm had already harvested credentials and pushed payloads to GitHub on behalf of compromised accounts.

What happened

Shai-Hulud is the first wide-scale self-replicating worm observed on npm. The attacker chain looked roughly like this:

  1. A maintainer's npm token leaks (phishing, malicious dep, stale CI secret).
  2. A trojanized version of one of their packages is published, containing a post-install script.
  3. The post-install script searches the dev's machine and CI runners for other npm tokens, GitHub tokens, and cloud credentials.
  4. Anything it finds is exfiltrated to a public GitHub repo on the victim's own account — and the worm uses those tokens to publish trojanized versions of their packages too.

The worm spread faster than the human review cycle could catch up, which is why this site exists: when a wave hits, you don't have hours to grep blog posts. You need to know now whether any of your installed name@version pairs match what's been pulled.

What to check

If you ran a Node toolchain between roughly 2025-09-14 and 2025-09-17:

  • Pull a fresh inventory from every dev machine and CI runner.
  • Verify against this site (see verify) — confirmed matches are reported loudly, suggestions softly.
  • Rotate any npm, GitHub, and cloud tokens that lived on those machines.
  • Audit your GitHub account for repos you didn't create. The worm dumps stolen secrets into a public repo named with a recognizable pattern.

Why it matters

Self-replicating supply-chain attacks change the math. A single leaked token is no longer a contained incident — it's a seed for the next wave. Treat maintainer credentials like production database creds, not like a convenience.

References

Community-driven supply-chain breach intel.A project from Aztecknology.