rotateit

All incidents

ChainDrop, a self-propagating npm worm that steals publish tokens

Disclosed Aug 4, 2026 · updated Oct 22, 2026 · critical · Active

An npm worm stole publish tokens.

Are you affected?

The free scanner that answers this opens soon. Until then, the steps below work by hand.

What happened

A self-propagating npm worm steals publish tokens. Microsoft describes ChainDrop, a worm that spread through more than 400 npm packages from unrelated publishers, including keyv, flat-cache and cache-manager. Stolen maintainer credentials seeded the first releases; after that, stolen npm publishing tokens and, in some workflows, GitHub Actions OIDC trusted-publishing access let it republish every package an identity could write to, with a preinstall hook added and the patch version bumped. Releases published through a trusted-publisher workflow can carry valid provenance. It steals npm and GitHub tokens (including the GitHub CLI token), AWS, Kubernetes and HashiCorp Vault credentials, environment variables, credential files, shell history, SSH keys and GitHub Actions runner memory.

Exposure starts
Not known yet (Microsoft gives no first-observed date)
Exposure ends
Not known yet
Confidence
Not known yet
Scope
every credential readable on a developer machine or CI runner that installed a compromised version, and every package its npm identity can publish

What to do, in this order

  1. Purge npm and yarn caches on affected machines and CI, and pin known-good versions

    Microsoft lists this before rotation; a cached compromised tarball reinstalls the worm and steals the new tokens.

  2. npm publish tokens

    The worm spreads by republishing every package a stolen npm token can write to, so these stop further spread first.

    npm_token

  3. GitHub tokens, including the gh CLI token, and the workflows trusted to publish to npm

    It steals GitHub tokens, enumerates writable repositories and abuses Actions OIDC publishing; tighten who can trigger a publish.

    github_pat, github_oauth_token, github_fine_grained_pat

  4. Cloud, Kubernetes and Vault credentials, then every other secret on the host

    It uses AWS, Kubernetes and Vault credentials to enumerate and pull more secrets, and reads environment variables and SSH keys.

    aws_access_key_id, aws_secret_access_key, private_key, anything else stored there

  5. Rebuild affected machines, base images and runners from a known-good baseline

    Microsoft's recovery step; the worm also plants .claude and .vscode files in repositories that re-run it.

Notes

  • Rotate from a known-clean machine. Microsoft: "Organizations should revoke and rotate exposed credentials from a known-clean environment and rebuild affected systems."
  • OIDC trusted publishing was abused, so provenance alone does not prove a release is clean. Review which workflows can publish, and their approvals and protected environments.
  • The full list of affected packages and versions is TODO; Microsoft names only three packages.
  • Status is active because Microsoft's post does not say the campaign has ended; TODO confirm.

How to tell if you’re affected

  • A preinstall script running node setup.mjs
  • .claude/settings.json, .claude/setup.mjs, .vscode/tasks.json or .vscode/setup.mjs added to a repository
  • Math_Symbol.js, Math_init.js or math_<guid>.js on a host
  • Connections to npm-cache.com, pypi-get.com or js-mirror.com
  • A repository description reading "Shai-Hulud: Here We Go Again"

Sources

Rotating the keys

Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.

One email when it opens. Stored: your email, whether you confirmed, and when you signed up. We send a confirmation link first.

By hand, free: the steps above.