The npm Supply Chain Attack Explained
The npm Supply Chain Attack Explained: What You Need to Know (And What To Do) A plain-language guide to the Shai-Hulud "Second Coming" attack—and how to protect yourself The Situation in Plain English If you're a developer, you probably use npm install regularly. It's one of those commands that feels as routine as checking your email. You type it, lean back, and wait for your project's dependencies to install. What if I told you that between November 21-24, this year, that simple command became dangerous? Here's what happened: attackers compromised some of the most popular npm packages used by developers worldwide—including tools made by Zapier, Postman, PostHog, ENS Domains, and AsyncAPI. When developers ran npm install to use these packages, malicious code ran automatically before the installation even finished. Most developers never noticed. The malware didn't install ransomware or encrypt your files. It did something arguably worse: it stole your secrets—every API key, GitHub token, AWS credential, and authentication token sitting on your machine—and uploaded them to public GitHub repositories where attackers could access them. Think of it like someone stealing your house keys. You might not notice the keys are gone for days. By then, the thief has already made copies and given them to accomplices. What Makes This Different? The "Worm" Aspect Traditional malware might infect one package. You'd catch it, the security team would fix it, and life goes on. This attack uses "worm" tactics. It's self-propagating. Here's how: The malware didn't just steal your secrets—it used those stolen credentials to log into npm and upload even more infected versions of other packages. Those new infected packages then did the same thing to the next developer who ran npm install. Result: In just four days, the attack spread to over 425 packages and compromised 25,000+ GitHub repositories full of stolen credentials. That's roughly 1,000 new breaches every 30 minutes. The attackers even named it after the sandworms in Dune—massive, self-replicating creatures that devour everything in their path. The metaphor is uncomfortably accurate.