ChainDrop Worm Compromises Over 1,300 npm Packages, Targets Developer Credentials

· Original article ↗

Summary

ChainDrop spread through compromised npm packages after a maintainer’s GitHub account was breached. The worm uses GitHub Actions releases and Bun-based payloads to steal developer and cloud credentials and propagate to more packages.

Key points

  • Aikido reported at least 868 compromised packages across 1,381 versions; the article says the campaign affected more than 1,300 packages with about 2 billion monthly downloads.
  • The attack began with the compromise of the GitHub account of Keyv’s maintainer and spread to related packages and packages associated with major organizations.
  • Malicious releases used legitimate GitHub Actions workflows and carried valid provenance information.
  • Affected packages used a preinstall hook to run setup.mjs, which downloaded Bun and executed Math_Symbol.js; BleepingComputer also saw packages containing math_init.js.
  • The malware searched developer systems and CI/CD runners for tokens, cloud credentials, secrets, keys, and other sensitive data, then encrypted collected credentials before sending them to a public GitHub repository.
  • Wiz identified npm-cache[.]com as an exfiltration indicator; tokens were reportedly validated against registry.npmjs[.]org/-/whoami.
  • Administrators who installed an affected version are advised to treat the system as compromised, rebuild it, rotate accessible tokens, and review logs and repositories.

Article Details

Attack Vectors
  • The attack began with the reported compromise of the Keyv maintainer’s GitHub account. Malicious files were pushed to affected projects’ main branches and released through their legitimate GitHub Actions workflows.
  • Affected npm packages included a preinstall entry that automatically ran setup.mjs during installation. The dropper downloaded Bun and used it to execute the credential-stealing Math_Symbol.js or math_init.js payload.
  • The malware could spread to packages from other maintainers that used a previously compromised package.
  • The payload collected developer, cloud, and CI/CD credentials and other sensitive data, encrypted the collected data, and sent it to a public GitHub repository. Wiz also identified npm-cache[.]com as being used for data exfiltration.
Defensive Notes
  • Treat a developer workstation or CI/CD runner as compromised if an affected package version was installed, even if the package was later removed.
  • Rebuild affected systems from safe backups or from scratch, rotate tokens accessible to the impacted environment, review logs for unauthorized access, and check repositories for unexpected commits or changes.
  • Continue using dependency allowlisting, integrity checks, and provenance controls; the article says the attack was still unfolding and the affected package count and versions could grow.

Indicators of compromise

TypeIndicatorContext
DOMAINnpm-cache[.]comWiz identified this domain as being used to exfiltrate data and recommended treating it as a strong indicator of compromise.

MITRE ATT&CK

Malware

Products

Related Articles