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 Silent Lynx Hits CIS Governments With WinRAR Flaw
threat intelligenceSilent Lynx Hits CIS Governments With WinRAR Flaw

CVE Research

Silent Lynx Hits CIS Governments With WinRAR Flaw

Silent Lynx (UAT-6275 / TAG-193) is a cyber-espionage actor targeting government organizations across the Commonwealth of Independent States. From June 2025 through August 2026, the group used four infection chains, including macro-enabled documents, PS2EXE downloaders, LNK-based PowerShell loaders, and WinRAR archives that exploit CVE-2025-8088, to deploy custom reverse shells such as FoalShell, Chvost, Laplas, and PickleShell. Activity spans nine countries and focuses on diplomacy, economic development, environmental management, water resources, and energy. This article summarizes the campaign’s delivery methods, infrastructure exposure, indicators of compromise, and practical mitigations for defenders.

Oct 16, 2026

Open Drupal Fixes Critical Field UI Flaw Linked to Remote Code Execution
Drupal Fixes Critical Field UI Flaw Linked to Remote Code Execution

CVE Research

Drupal Fixes Critical Field UI Flaw Linked to Remote Code Execution

A critical vulnerability in Drupal core's Field UI module could allow attackers to execute arbitrary code on vulnerable websites through exposed contributed modules or custom code. Tracked as CVE-2026-108097, the flaw stems from improper validation of PHP callbacks during table rendering. At least one known exploitation path does not require authentication, potentially putting affected websites at risk of server compromise.

Oct 16, 2026

Open Palo Alto PAN-OS Vulnerability CVE-2026-0322 Could Allow Root-Level Code Execution
vulnerability researchPalo Alto PAN-OS Vulnerability CVE-2026-0322 Could Allow Root-Level Code Execution

CVE Research

Palo Alto PAN-OS Vulnerability CVE-2026-0322 Could Allow Root-Level Code Execution

Oct 15, 2026

Open Cisco Secure Email Gateway Under Attack: Critical CVE-2026-76519 Enables Arbitrary File Write
vulnerability researchCisco Secure Email Gateway Under Attack: Critical CVE-2026-76519 Enables Arbitrary File Write

CVE Research

Cisco Secure Email Gateway Under Attack: Critical CVE-2026-76519 Enables Arbitrary File Write

Oct 15, 2026