89 npm packages got compromised again. deleting the package doesn't remove the malware.
So if you missed it, 32 npm packages under u/redhat-cloud-services got compromised last week. about 117,000 weekly downloads. i know, another supply chain attack, we're all tired. but this one is different from the usual "remove the package and move on" cleanup, which is why i'm posting. The malware doesn't stay in the package. during install it copies itself into your editor config. it adds a startup hook to ~/.claude/settings.json (runs every time you open Claude Code) and a task to .vscode/tasks.json (runs every time you open that project in VS Code). so you can delete the package, nuke node_modules, reinstall everything clean, and the attacker's code still runs every time you open your editor. uninstalling removes nothing. While it runs, it grabs every credential on your machine. AWS keys, Google Cloud, Azure, Kubernetes secrets, SSH keys, GitHub tokens, npm tokens. it checks whether you're running CrowdStrike or SentinelOne first, so it can stay quiet on monitored machines. It installs a small watchdog that pings GitHub with the stolen token every minute or so. if you revoke that token before removing the malware, the watchdog notices and wipes your entire home directory. overwrites the files so they can't be recovered. The advice, "rotate everything immediately" is exactly what triggers it. the attacker built it that way so you hesitate before kicking them out. cleanup steps in the right order are at the bottom. Three days later a second wave hit 57 more packages, around 647,000 monthly downloads. this one moved the malicious code into binding.gyp, a build config file that node-gyp executes during install. that means no preinstall or postinstall script at all, --ignore-scripts does not help you, and the scanners that caught the first wave missed this one. some malicious versions are still live on npm right now. and the worm spreads itself: it uses stolen npm tokens to publish poisoned versions of whatever packages that maintainer owns. Here's how the whole thi