On 4 August 2026, attackers took over the account of the maintainer behind the popular npm package keyv. From there, a self-spreading program called the CHAINDROP worm pushed malicious code into more than 400 npm packages, among them keyv, flat-cache, cacheable-request and cache-manager. Any Node.js website or build server that installed an affected version may have had its credentials stolen.

What is going on

npm is the shared library of ready-made code that most Node.js websites are built from. Developers pull in small packages, and those packages pull in others, so one popular package can sit inside thousands of projects.

CHAINDROP abuses a feature called a preinstall hook. That is a small script a package is allowed to run automatically the moment it is installed, before anything else happens.

The script searches the machine for npm tokens, GitHub credentials, SSH keys, cloud keys and AI-tool keys, and sends them away. It then uses the stolen npm access to republish other packages the victim maintains, which is how it keeps spreading on its own. Think of a delivery that quietly copies every key in the hallway, then posts itself to everyone in the address book.

Who is affected

This affects Node.js projects, not WordPress or other PHP sites by themselves. If your site, app or build server installed one of the more than 400 affected packages on or after 4 August 2026, treat it as exposed.

Named packages include keyv, flat-cache, cacheable-request and cache-manager. These are common indirect dependencies, so you may have them without ever choosing them. Developer laptops and continuous integration servers are at least as exposed as the live website, because that is where keys are usually stored.

What to do now

  1. Check your lockfiles. Search package-lock.json or yarn.lock for the named packages and note the exact versions installed since 4 August 2026.
  2. Reinstall clean versions. Delete node_modules, pin versions known to be unaffected and rebuild from scratch.
  3. Rotate every key. Replace npm tokens, GitHub credentials, SSH keys, cloud keys and AI-tool keys used on any machine that ran an install.
  4. Turn on npm two-factor authentication for every account that publishes packages, so a stolen token alone is not enough.
  5. Install with `--ignore-scripts` on build servers, so packages cannot run code during installation.

How to check your own site

A scan cannot read your lockfile, but it can show what an attacker would see if keys were taken. The free Website Security Check flags outdated software, known-vulnerable components, missing security headers, weak TLS and email-authentication gaps, and the Full scan adds active OWASP Top 10 testing, port and service checks with CVE matching, and exposed-file and secret checks on sites whose ownership you verified. If you suspect credentials leaked from a build server, run a full scan alongside your key rotation.

Source: Elastic Security Labs, August 2026.