ChainDrop Worm Compromises Hundreds of npm Packages to Steal Credentials and Spread

· Original article ↗

Summary

A worm dubbed ChainDrop compromised hundreds of npm packages, including widely used projects. Its payload can collect credentials and cloud secrets, exfiltrate data, and spread through npm packages and GitHub repositories.

Key points

  • The campaign began on August 4, 2026, with malicious commits affecting packages including keyv, Cacheable-family packages, and ecto; some affected packages have over 150 million weekly downloads.
  • A malicious preinstall script runs a loader that starts an obfuscated second-stage payload under Bun, including when the package is installed without being imported by an application.
  • The payload targets files, environment variables, GitHub Actions runner memory, and secrets in AWS, Kubernetes, and Vault.
  • Collected data is encrypted and sent to a domain retrieved through an Ethereum smart-contract dead drop; a GitHub repository can serve as an exfiltration fallback.
  • The malware can use stolen credentials to publish infected npm packages and add hooks or workflows to GitHub repositories, enabling further spread and secret theft.
  • A command-and-control response can provide code for execution in the payload, creating an additional remote code-execution capability.
  • The article provides affected-package information and indicators of compromise, including file hashes, network indicators, and persistence-related paths.

Article Details

Attack Vectors
  • Compromised npm packages execute setup.mjs through a preinstall lifecycle script, which starts the second-stage payload under Bun.
  • The payload collects credentials and secrets from files, environment variables, GitHub Actions runner memory, cloud secret stores, Kubernetes, and HashiCorp Vault.
  • The payload uses stolen npm credentials to modify and republish writable packages, and uses GitHub credentials to add execution hooks to repository branches.
  • The payload exfiltrates encrypted data to a contract-selected HTTPS endpoint or, as a fallback, to a public GitHub repository.
  • A response from the primary C2 can supply JavaScript that the payload evaluates inside the Bun process.
Defensive Notes
  • Check whether compromised package versions were installed in hosts, containers, and build environments.
  • Block known malicious packages at installation time and monitor npm and PyPI package installations.
  • Inspect the source, workflow, and artifact referenced by provenance; provenance alone is not a safety verdict.

Indicators of compromise

TypeIndicatorContext
SHA25614eb4ce01dd4307759887ff819359b70d7d9ff709ecde039a5abc1aac325b128SHA-256 hash of the maliciously injected .claude/settings.json artifact.
SHA256166be2b7b58a440f7b17520ffb0368be5d89c76661704b4945417eb04b9ada65SHA-256 fingerprint of the key used to verify fallback C2 domains.
SHA25629ac906c8bd801dfe1cb39596197df49f80fff2270b3e7fbab52278c24e4f1a7SHA-256 hash of the Python artifact used to collect GitHub Actions runner memory.
SHA2563f3f42d072bd36860ab7bd7fb5e10ac0d22c741c13c89505ccd6ec0ea572eea7SHA-256 hash of the injected malicious GitHub workflow.
SHA256619c56acf572df75b6004a6fc013c80900316a76099b241d64312da3a44f10b4SHA-256 hash of the token-monitor installer artifact identified in the article.
SHA256927387d0cfac1118df4b383decc2ea6ba49c9d2f98b47098bcbcba1efc026e1fSHA-256 hash of the maliciously injected .vscode/tasks.json artifact.
SHA2569fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bccSHA-256 hash of the malicious stage-two payload.
SHA256dc1e6a7ddb29390dd53cf1e5aac40ad9204ea7c6b83ef5656e7cb7a796808b67SHA-256 fingerprint of the RSA public key used for exfiltration.
SHA256fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1ebSHA-256 hash of the embedded and propagated malicious loader.
URLhxxps[:]//awqhnjewqjkl[.]icu/routerC2 URL used for exfiltration.
URLhxxps[:]//js-mirror[.]com/routerC2 URL used for exfiltration.
URLhxxps[:]//npm-cache[.]com/routerC2 URL used for exfiltration.
URLhxxps[:]//pypi-get[.]com/routerC2 URL used for exfiltration.

MITRE ATT&CK

People

Malware

Products

Industries

Related Articles