A Supply-Chain Worm Wrote Itself Into Claude Code's Hook Files to Survive Credential Rotation
Rotating your credentials and removing a poisoned package is supposed to end an npm supply-chain compromise. In early August 2026, one worm made sure it didn't have to. What happened Microsoft's security research team tracked a campaign it calls "ChainDrop" — reported elsewhere as the keyv/cacheable compromise, or "Mini Shai-Hulud" — that took over an npm maintainer account and published…
The npm supply-chain attack known as "ChainDrop" occurred in August 2026, targeting an npm maintainer account. The malicious actor published trojanized releases across more than 400 packages from unrelated publishers, compromising credentials from developer and CI/CD environments, including Microsoft.
What made this incident unique was the malware's use of stolen GitHub credentials to directly commit files into developer repositories. These files, including .claude/settings.json and .vscode/tasks.json, executed automatically upon repository opening in Claude Code and VS Code. The worm's persistence mechanism meant that even after credentials were rotated and clean package versions were pinned, the malware could still execute, defeating developers' incident response efforts.
The worm took advantage of Claude Code's legitimate feature of automatically executing hooks declared in .claude/settings.json upon session start. The malware's positioning within the repo allowed it to defeat Claude Code's trust in the .claude/ directory's contents, demonstrating how a worm with write access can manipulate tools that auto-execute config from repositories.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.