SHARE
Facebook X Pinterest WhatsApp

Wormable Malware Compromises npm Supply Chain

Wormable malware spread through npm packages, stealing secrets and infecting code.

Sep 18, 2025
eSecurity Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

On Sept. 15, security researchers reported a significant supply chain attack targeting the npm package ecosystem. 

The incident involved a self-propagating malware strain that compromised widely used code packages, including @ctrl/tinycolor, as part of a broader campaign affecting more than 180 packages. The attack highlights persistent threats to open-source package registries and their importance within modern software development workflows.

Overview of the attack

The first package identified in this campaign, rxnt-authentication, was updated on Sept. 14, shortly before additional compromises were detected. 

Investigators found that the malware leveraged worm-like behavior to spread through npm, making it one of the first documented self-replicating attacks within this ecosystem. By embedding itself in legitimate packages, the malware posed a risk to developers and organizations dependent on npm for software distribution.

Malware functionality

The malicious code followed a multi-stage process designed to harvest credentials, exfiltrate data, and propagate further across the npm registry:

  • Credential Harvesting: The malware scanned infected systems and continuous integration (CI) environments for secrets, including cloud keys, authentication tokens, and environment variables. Tools such as TruffleHog were employed to locate sensitive information.
  • Data Exfiltration: Stolen information, along with host and system metadata, was dumped into public GitHub repositories under names such as Shai-Hulud, enabling attackers to retrieve compromised data.
  • GitHub Actions Exploitation: The malware deployed a malicious workflow file (.github/workflows/shai-hulud-workflow.yml) to extract repository secrets and forward them to attacker-controlled webhooks.
  • Self-Replication: By capturing npm authentication tokens, the malware republished other packages maintained by compromised developers, embedding its code to ensure further spread.
  • Repository Manipulation: Private repositories were made public or injected with additional workflows and branches, expanding the infection surface across development environments. 

Supply chain threats

This incident follows several high-profile compromises in the npm ecosystem, including attacks on cryptocurrency-related packages and development frameworks. Such events underscore the systemic risk posed by supply chain vulnerabilities in package management systems. 

npm, which serves as the world’s largest repository of JavaScript packages, is a frequent target due to its critical role in application development.

Mitigation and recommendations

Review GitHub accounts and npm registries

Organizations should audit GitHub accounts for suspicious activity, such as the creation of unauthorized repositories or branches labeled Shai-Hulud. Developers should also examine npm registries for unapproved package versions or newly published content under their accounts.

Identify and remove compromised packages

Affected npm packages are being removed from the registry by their maintainers. Security teams should review and uninstall impacted packages from development pipelines and endpoints. In confirmed infections, it may be necessary to purge local npm caches and reinstall dependencies to eliminate embedded malware.

Rotate compromised secrets

Devices running trojanized packages should be isolated until remediation is complete. All exposed credentials—including cloud keys, API tokens, database connection strings, SSH keys, and GitHub secrets—should be rotated. 

Even without confirmed compromise, rotating high-value secrets across environments can reduce potential exposure.

Monitor network activity

Investigators observed the malware using outbound connections to webhook[.]site to verify successful propagation. Organizations not relying on this service should consider blocking the domain to prevent unauthorized traffic.

The npm supply chain compromise demonstrates the evolving sophistication of malware targeting open-source ecosystems. 

By combining credential theft, data exfiltration, and self-replication, this campaign highlights the risks inherent to decentralized package management platforms. Proactive auditing, secret rotation, and vigilant monitoring remain critical for safeguarding development environments against emerging supply chain threats.

Recommended for you...

Microsoft Disrupts Major Phishing Operation Targeting Microsoft 365
When Ads Attack: Inside the Growing Malvertising Threat
New HybridPetya Ransomware Strikes Before Boot
North Korean Hackers Weaponize ChatGPT in AI-Driven Phishing Attack
eSecurity Planet Logo

eSecurity Planet is a leading resource for IT professionals at large enterprises who are actively researching cybersecurity vendors and latest trends. eSecurity Planet focuses on providing instruction for how to approach common security challenges, as well as informational deep-dives about advanced cybersecurity topics.

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.