Security0 views

ChainDrop Worm Hijacks npm Packages Through VS Code and Claude Automation

Researchers have uncovered ChainDrop, a new variant of the Shai-Hulud worm that compromised 444 packages in the npm registry. The attack targeted widely-used infrastructure dependencies in the JavaScript ecosystem, including keyv, flat-cache, and cache-manager—components with roughly two billion monthly downloads combined. What makes this malware particularly dangerous is its ability to spread silently by avoiding direct changes to public Git repositories.

Instead of modifying source code, the worm reconstructs tarball files distributed on npm and injects malicious payloads directly into the final packages. This approach bypasses traditional static analysis tools and code auditing mechanisms. Once the script executes in CI/CD pipelines or on local machines, it scans environment variables, terminal configurations, and memory for cloud keys and tokens with write permissions. Armed with GitHub credentials, it exploits the service's API to automatically inject malicious automations into VS Code's tasks.json and Claude Code's settings.json files across all branches. A developer opening the project in their editor unknowingly triggers background tasks that harvest secrets, restarting the infection cycle.

All affected packages have been removed from npm. Security experts recommend auditing task files in your projects and pinning dependencies to specific versions to prevent automatic updates from pulling compromised packages.