A new wave of npm supply-chain compromise, nicknamed ChainDrop, hit the JavaScript ecosystem on 4 August 2026. Attackers took over the maintainer behind keyv and related caching libraries and then used stolen tokens to spread a credential-stealing worm into hundreds of packages. Microsoft Threat Intelligence counted more than 400 affected packages from multiple unrelated publishers and described the payload as a variant of the Shai-Hulud worm.
What happened
According to Datadog Security Labs, the attacker pushed a malicious commit to the keyv GitHub repository and then to other projects, including jaredwray/cacheable and jaredwray/ecto. The tampered [email protected] was published at 09:35 UTC. Known bad versions include:
[email protected],[email protected],[email protected],[email protected][email protected],[email protected],[email protected]- several
@cacheable/*packages (net,node-cache,memory,utils)
Technical details
- A
preinstallhook runs a loader (setup.mjs) that starts an obfuscated second stage under the Bun runtime, detached from the install process. - The payload harvests environment variables, SSH keys,
.envand cloud configuration files, GitHub CLI tokens, GitHub Actions runner memory, and secrets from AWS, Kubernetes and HashiCorp Vault. - Stolen data is encrypted and sent to command servers whose addresses are resolved from an Ethereum smart contract, with GitHub repositories as a fallback.
- With an npm token, the worm lists every package the identity can publish, injects itself, bumps the patch version and republishes. With GitHub access it plants
.claude/and.vscode/configuration files that re-launch the loader when a developer opens the project.
Recommendations
- Search lockfiles, artifact repositories and CI caches for the versions above and for transitive pulls; pin known-good versions and purge npm/yarn caches.
- Rotate npm, GitHub, cloud and Vault credentials from a clean machine, and rebuild affected workstations and build runners.
- Hunt for
setup.mjs,Math_Symbol.js/math_init.js, unexpected.claude/settings.jsonor.vscode/tasks.jsonfiles, and traffic tojs-mirror[.]com,npm-cache[.]comandpypi-get[.]com. - Use npm’s
min-release-agesetting and restrict install scripts in CI where possible.