AZSecureby Azguards Technolabs

Security bulletins · Microsoft Threat Intelligence

ChainDrop: self-spreading npm worm hits 400+ packages

Malicious versions of more than 400 npm packages stole npm, GitHub and cloud credentials at install time, then used them to infect more packages.

CriticalExploited in the wildNode.js

Free website scan

Is your store serving malware right now?

Checks home, product, cart and checkout pages, blocklists, exposed files and spam shown only to Google. Takes about a minute.

What happened

Microsoft reported a supply-chain attack it calls ChainDrop, a variant of the Shai-Hulud worm. Malicious versions of more than 400 npm packages from unrelated publishers, including keyv, flat-cache and cache-manager, added a preinstall script (setup.mjs) that ran when the package was installed.

The script collected npm, GitHub, cloud, Kubernetes and Vault credentials from developer machines and CI runners, then used stolen npm tokens to publish infected versions of other packages, sometimes with valid provenance. It also planted files in editor and AI-assistant configuration folders.

What to do

  1. Search your lockfiles and CI caches for the affected package versions listed by Microsoft.
  2. Pin known-good versions and clear npm and yarn caches before the next install.
  3. Treat any developer machine or CI runner that installed an affected version as compromised: rotate every credential it could reach from a clean machine, and rebuild it.
  4. Make it harder next time: install with scripts disabled where you can, and use a minimum package age before new versions are installed.

Not sure if your site is affected?

The free scan looks at your site from outside: what it runs, exposed files, injected scripts and known malicious domains. It can't read your exact patch level. A deep scan can: it checks the installed versions and packages against this bulletin and looks for what attackers leave behind.

Patched late, or not sure when?

A deep scan checks your server with read-only access, and an Azguards engineer signs off the report.

Sources

Posted by the Azguards security team. Last reviewed .