Critical npm Supply Chain Attack Infects 1,300+ Packages with Credential-Stealing Worm

A new Shai-Hulud malware variant, ChainDrop, compromises over 1,300 npm packages, stealing developer and cloud credentials. Learn how it works and how to respond.

Critical npm Supply Chain Attack Infects 1,300+ Packages with Credential-Stealing Worm
Sarah Collins

Sarah Collins

Computing Editor

Specializes in PCs, laptops, components, and productivity-focused computing tech.

What is the ChainDrop worm and why does it matter?

ChainDrop is a newly uncovered variant of the Shai-Hulud supply chain malware that targets the npm ecosystem by infecting popular JavaScript packages. It has compromised over 1,300 packages, including widely used libraries like Keyv and Cacheable, which collectively receive around 2 billion downloads monthly. This mass infection allows the malware to spread rapidly across developer environments and continuous integration pipelines.

The worm steals sensitive credentials such as GitHub Personal Access Tokens, API keys, cloud credentials (AWS, Kubernetes), and local configuration files. By exfiltrating these secrets to a public GitHub repository, the attackers can gain unauthorized access to developer accounts and cloud infrastructure, significantly increasing the risk of further exploitation and persistent compromise.

How does ChainDrop infect packages and systems?

ChainDrop npm Worm: Bun-loaded CI/CD credential harvester with Ethereum  dead-drop C2 - StepSecurity
ChainDrop npm Worm: Bun-loaded CI/CD credential harvester with Ethereum dead-drop C2 - StepSecurity

The attackers first compromised GitHub accounts of maintainers for key npm packages and injected malicious code directly into the projects’ main branches. These tampered packages are then published as legitimate releases, making it easy for users to unknowingly download the infected versions.

Once installed, the worm harvests credentials from developer machines and CI/CD environments. Even after the infected packages are removed, affected workstations and runners should be considered compromised, as the malware may have already extracted sensitive secrets that provide continued attacker access.

Implications for npm developers and organizations

  • Any project depending on infected packages is at risk of credential leakage and subsequent infiltration.
  • CI/CD pipelines using these packages could be a vector for automated spread and escalation.
  • Cloud services linked to compromised credentials face potential data breaches or service disruptions.

What steps should you take if you use affected packages?

First, determine whether your projects use any of the compromised libraries or their versions. If so, treat your developer environment or build servers as compromised and take these immediate actions:

  1. Revoke and rotate all exposed credentials, tokens, and API keys used in development or deployment pipelines.
  2. Conduct comprehensive scans of developer workstations, CI/CD runners, and infrastructure for signs of persistent malware.
  3. Update all dependencies to clean, verified versions or switch to alternative packages if necessary.
  4. Enhance security posture with strict token permissions, environment isolation, and additional monitoring.

What does this attack indicate about npm supply chain security?

ChainDrop npm Worm: Bun-loaded CI/CD credential harvester with Ethereum  dead-drop C2 - StepSecurity
ChainDrop npm Worm: Bun-loaded CI/CD credential harvester with Ethereum dead-drop C2 - StepSecurity

ChainDrop highlights the serious risks inherent in open-source package ecosystems, where compromising high-use libraries amplifies malware distribution. It underscores the necessity for robust supply chain security practices, including:

  • Strict access controls and monitoring of package maintainers’ accounts and repositories.
  • Automated integrity checks and crawling for suspicious package modifications.
  • Fostering collaborative incident response and transparency across the developer community.

Awareness and timely remediation can mitigate damage, but the evolving tactics of threat actors require constant vigilance.

React to this story

Related Posts