SHARE
Facebook X Pinterest WhatsApp

Wormable Malware Hits npm Supply Chain

A fast-spreading malware campaign has compromised npm packages, stealing secrets and infecting code repositories.

Written By
thumbnail Antony Peyton
Antony Peyton
Sep 19, 2025
Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Security researchers have revealed a large-scale supply chain breach in the npm ecosystem this week.

The campaign, discovered by Arctic Wolf, used a wormable malware strain that infiltrated more than 180 packages, including popular libraries like @ctrl/tinycolor.

The first compromised package, rxnt-authentication, was updated on September 14 — just before researchers traced further infections.

This marks one of the first documented self-replicating malware attacks within npm, raising alarms about the fragility of open-source supply chains.

How the malware works

The malicious code executed a multi-phase attack aimed at credential theft, data exfiltration, and automated replication across the npm registry:

  • Credential harvesting: Scanned infected systems and CI/CD environments for secrets such as API tokens, cloud keys, and environment variables, using tools like TruffleHog.
  • Data exfiltration: Dumped stolen secrets and host metadata into public GitHub repositories (for example, Shai-Hulud) for attacker retrieval.
  • GitHub Actions abuse: Deployed a malicious workflow (.github/workflows/shai-hulud-workflow\.yml) to siphon repository secrets and forward them to attacker-controlled webhooks.
  • Self-replication: Used stolen npm auth tokens to re-publish additional compromised packages, embedding the malware for further spread.
  • Repository manipulation: Made private repos public or injected new branches and workflows, widening the infection across development environments.

Broader supply chain risks

This campaign follows other high-profile npm breaches, including attacks on cryptocurrency packages and developer frameworks.

With npm being the world’s largest JavaScript package registry, it remains a prime target for adversaries.

Mitigation and defensive measures

While this development is alarming, there are defensive steps you can take:

  • Audit GitHub and npm accounts: Check for unauthorized repositories, branches, or packages — especially those linked to Shai-Hulud.
  • Remove compromised packages: Immediately uninstall affected packages and clear local npm caches before reinstalling dependencies.
  • Rotate secrets: Assume all credentials exposed in development pipelines are compromised — rotate API keys, cloud tokens, SSH keys, and GitHub secrets.
  • Monitor outbound traffic: Block or closely monitor outbound calls to webhook\[.]site, which the malware used to validate infections.

Takeaway

The npm incident underscores the growing sophistication of malware targeting open-source ecosystems.

By combining credential theft, data exfiltration, and worm-like self-replication, attackers exploited the decentralized nature of package management at scale.

Continuous auditing, proactive secret rotation, and vigilant monitoring are essential to defending against supply chain compromises.

Recommended for you...

AI in Cybersecurity: The Comprehensive Guide to Modern Security
Liz Ticong
Apr 29, 2024
What Is Cybersecurity? Definitions, Practices, Threats
Liz Ticong
Apr 8, 2024
How to Secure a Network: 9 Key Actions to Secure Your Data
Liz Ticong
Mar 21, 2024
7 Best Data Security Software: Solutions For 2024
Datamation Logo

Datamation is the leading industry resource for B2B data professionals and technology buyers. Datamation's focus is on providing insight into the latest trends and innovation in AI, data security, big data, and more, along with in-depth product recommendations and comparisons. More than 1.7M users gain insight and guidance from Datamation every year.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.