SecPod

Learn Search

Search across all Learn content

← Back to Security Research
Worm in the Code: npm Supply Chain Attack Compromises 40+ Packages

Worm in the Code: npm Supply Chain Attack Compromises 40+ Packages

A major supply chain attack has been uncovered in the npm ecosystem, where more than 40 widely used packages were found compromised. The campaign, powered by a self-replicating malware dubbed “Shai-Hulud”, is actively spreading and exfiltrating sensitive credentials. Developers and organizations usi...

Sep 17, 2025By Ankireddy Sai Sandeep Reddy3 min read

A major supply chain attack has been uncovered in the npm ecosystem, where more than 40 widely used packages were found compromised. The campaign, powered by a self-replicating malware dubbed “Shai-Hulud”, is actively spreading and exfiltrating sensitive credentials. Developers and organizations using npm must take immediate action to secure their environments.

Vulnerability Details

The attack leverages a worm-like payload injected into legitimate npm packages. Once installed, the malware scans for developer and CI/CD secrets such as GitHub and npm tokens, then uses them to publish further malicious package versions. This self-propagating mechanism allows the compromise to spread quickly across the ecosystem, making it one of the most severe npm incidents to date.

The worm also creates malicious GitHub Actions workflows in compromised repos, enabling persistence and continuous theft of new secrets. This turns every infected maintainer into a new attack vector.

Affected Products

The Shai-Hulud attack has compromised over 180 npm packages across a wide range of popular and critical libraries used in JavaScript development. This widespread compromise impacts development environments on Windows, Linux, and macOS. Below are some of the most notable packages affected:

  • @ctrl/tinycolor: A popular color manipulation library with millions of weekly downloads; early infected package spreading the malware widely.
  • koa2-swagger-ui: Used in API documentation for Koa2 framework, trojanized versions executed malicious payloads.
  • json-rules-engine-simplified: Provides decision automation and business logic capabilities, now a vector for automated malware spread.
  • @nativescript-community/ui-material-core (and related packages): Mobile UI component libraries compromised, impacting cross-platform mobile app development.
  • ngx-toastr: Widely used Angular notification library, infected to infect front-end ecosystems.
  • react-complaint-image: React component affected, showing the breadth of the attack reaching UI and front-end packages.

Each of these packages was modified to include a malicious post-install script that automatically runs on install, harvesting secrets such as GitHub and npm tokens, credentials to cloud services, and CI/CD environment variables. Using these stolen credentials, the malware autonomously pushed infected updates to other packages under the control of the compromised maintainers, allowing rapid self-propagation.

Mitigation & Remediation

Given the active exploitation, immediate mitigation is critical:

  • Remove malicious package versions from your projects.
  • Rotate all developer and CI/CD tokens (GitHub PATs, npm tokens, cloud keys).
  • Audit repositories for unauthorized GitHub Actions workflows.
  • Patch build environments and restrict long-lived tokens.

npm maintainers should also review publishing rights and reset access credentials to prevent further abuse.

Tactics, Techniques, and Procedures (TTPs)

Attackers are exploiting the trust model of package management to execute arbitrary code in developer and CI pipelines.

  • TA0002 – Execution: Malicious code executes when installing infected npm packages.
  • T1203 – Exploitation for Client Execution: Vulnerabilities in developer environments are abused for code execution.
  • T1537 – Exfiltration: Secrets are stolen and uploaded to attacker-controlled infrastructure.

Other Vulnerabilities Addressed

This campaign has drawn attention to broader ecosystem risks. Security firms emphasize the importance of dependency hygiene, ephemeral tokens, and strict CI/CD controls to prevent future supply chain compromises.

Instantly Fix Risks with Saner Patch Management

Saner patch management is a continuous, automated, and integrated software that instantly fixes risks exploited in the wild. The software supports major operating systems like Windows, Linux, and macOS, as well as 550+ third-party applications.

It also allows you to set up a safe testing area to test patches before deploying them in a primary production environment. Saner patch management additionally supports a patch rollback feature in case of patch failure or a system malfunction.

Experience the fastest and most accurate patching software here.

Featured Posts

Open Root-Level RCE Flaw in Cisco Nexus 9000 Series Switches Exposes Networks to Complete Compromise — CVE-2026-20212
Root-Level RCE Flaw in Cisco Nexus 9000 Series Switches Exposes Networks to Complete Compromise — CVE-2026-20212

CVE Research

Root-Level RCE Flaw in Cisco Nexus 9000 Series Switches Exposes Networks to Complete Compromise — CVE-2026-20212

CVE-2026-20212 is a critical vulnerability in Cisco Nexus 9000 Series Switches that use Silicon One ASICs. It allows an unauthenticated remote attacker to execute code with root privileges by sending crafted input to TCP ports 43210 and 43211, which are reachable in the default Layer 3 VRF. Exploitation can also crash the S1HAL process and force a device reload. This article covers how the vulnerability works, the affected product identifiers, its potential impact, available workarounds, and how to identify fixed software using the Cisco Software Checker.

Sep 4, 2026

Open SonicWall SMA 1000 Under Active Attack: Two Zero-Days Enable SSRF and Remote Code Execution
SonicWall SMA 1000 Under Active Attack: Two Zero-Days Enable SSRF and Remote Code Execution

CVE Research

SonicWall SMA 1000 Under Active Attack: Two Zero-Days Enable SSRF and Remote Code Execution

Sep 3, 2026

Open Introducing SecPod VEX Studio: Guided Vulnerability Exploitability Assessment for Open-Source Maintainers
Secpod_VEX_Studio For Open-Source Vulnerability Management

CVE Research

Introducing SecPod VEX Studio: Guided Vulnerability Exploitability Assessment for Open-Source Maintainers

A human-guided path from SBOM and vulnerability data to reviewable OpenVEX statements

Sep 2, 2026

Open Inside the PaperCut Zero-Day Attack Chain: Auth Bypass to Code Execution
Inside the PaperCut Zero-Day Attack Chain: Auth Bypass to Code Execution

CVE Research

Inside the PaperCut Zero-Day Attack Chain: Auth Bypass to Code Execution

Sep 1, 2026