A worm named Shai-Hulud just poisoned 2 billion monthly npm downloads

A worm named Shai-Hulud just poisoned 2 billion monthly npm downloads

A worm dubbed 'Shai-Hulud' hijacked a core maintainer account, poisoning over 400 npm packages with secret-stealing malware.

On August 4, attackers compromised a developer's GitHub account and pushed malicious releases across the Keyv caching library ecosystem, including flat-cache and file-entry-cache. The poisoned packages hijack npm install to download the Bun runtime and execute a hidden payload. According to Aikido Security, the malware extracts npm tokens, AWS credentials, Kubernetes secrets, SSH keys, and .env files, encrypts the findings, and posts them to a public GitHub repository.

Why it matters: The payload spreads like a worm, automatically attempting to infect packages owned by any developer who installs a poisoned update. With at least 434 packages compromised across 1,381 versions, the attack touches projects that account for over two billion monthly downloads.

Know this: Check your lockfiles for impacted versions like keyv 6.0.0, flat-cache 6.1.24, or file-entry-cache 11.1.6. If a local machine or CI runner executed npm install against an affected release, assume all local credentials and environment variables are compromised and rotate them.

If you haven't audited your build logs today, consider this your sign to start.