520 million+ cumulative downloads (for TanStack incident)
This report analyzes a severe escalation in the npm supply chain threat landscape, detailed in research by Unit 42. Since the emergence of the Shai-Hulud worm in September 2025, threat actors have shifted from nuisance-level attacks to systematic, high-impact campaigns. Adversaries, including the prolific TeamPCP group, are now deploying next-generation wormable malware such as Mini Shai-Hulud and Miasma. These attacks compromise developer accounts and abuse CI/CD pipelines—notably on GitHub—to distribute trojanized packages. Recent targets include widely-used libraries from Red Hat and TanStack, demonstrating the ability to bypass conventional security controls like code review and even subvert SLSA provenance checks. The primary goals are credential harvesting from developer environments and further propagation, creating a self-sustaining cycle of compromise that threatens the entire software development ecosystem.
The npm ecosystem has transitioned into a high-consequence battleground for supply chain attacks. The original Shai-Hulud worm set the precedent, but recent campaigns show a marked increase in sophistication and automation.
Key Incidents:
Red Hat Cloud Services Compromise (June 1, 2026): An attacker used a compromised Red Hat employee's GitHub account to inject the Miasma payload into 32 packages under the @redhat-cloud-services namespace. The attacker bypassed code review by pushing orphan commits and abused GitHub Actions to generate validly signed, yet malicious, packages using OpenID Connect (OIDC) tokens. These packages averaged 80,000 weekly downloads.
TanStack CI/CD Pipeline Attack (May 11, 2026): TeamPCP executed a credential-free attack by chaining three GitHub Actions weaknesses. They compromised the CI pipeline for TanStack, a popular developer tooling provider, publishing 84 malicious artifacts across 42 @tanstack/* packages within minutes. The worm's self-propagation mechanism quickly spread to 169 distinct npm packages, impacting an estimated 520 million cumulative downloads.
Ongoing Mini Shai-Hulud Waves: Throughout April and May 2026, multiple campaigns attributed to TeamPCP deployed variants of the Mini Shai-Hulud worm. These attacks included impersonating legitimate packages like @bitwarden/cli to steal credentials and backdoor developer projects for further propagation.
The core attack vector has shifted from simple typosquatting to the direct compromise of developer accounts and the CI/CD infrastructure they trust. By injecting malware during the automated build and publish process, attackers gain implicit trust and achieve massive distribution.
Adversaries are employing a multi-stage approach that combines social engineering, credential abuse, and CI/CD exploitation. The Miasma payload, derived from the open-sourced Mini Shai-Hulud, serves as a prime example.
Attack Chain Breakdown:
T1078 - Valid Accounts) or by exploiting misconfigurations in CI/CD environments, as seen in the credential-free TanStack attack.T1134 - Access Token Manipulation) to publish packages to the npm registry.index.js file, increasing its size by 25x—a potential detection indicator.T1195.002 - Compromise Software Supply Chain). The package appears legitimate, often with valid digital signatures or SLSA provenance, as the trusted pipeline itself was used for publication.npm install, the malicious scripts execute (T1059.007 - JavaScript/JScript). The payload then activates, initiating credential theft and propagation.T1555 - Credentials from Password Stores).The public release of the Mini Shai-Hulud source code by TeamPCP on May 12, 2026, has significantly lowered the barrier to entry for other actors, making attribution difficult and foreshadowing a rise in copycat attacks.
The business impact of these attacks is severe and multi-faceted, extending far beyond the initial victims.
The source article focuses on TTPs rather than traditional IOCs. However, the following contextual indicators were mentioned:
@bitwarden/cli2026.4.0@bitwarden/cli package.@redhat-cloud-servicesShai-Hulud: The Third ComingMiasma: The Spreading BlightSecurity teams may want to hunt for the following patterns, which could indicate related activity:
index.jsindex.js files in node_modules directories.npm installnpm install processes that spawn unexpected child processes (e.g., curl, bash, powershell).GitHub Actions logsbuild-server -> external-storage~/.npmrcHKCU\Software\npmDetecting these attacks requires a defense-in-depth approach focused on the software development lifecycle.
npm install and observe the behavior of pre/post-install scripts. A D3FEND technique like Dynamic Analysis (D3-DA) can identify scripts that attempt to access the network or read sensitive files.npm or node processes making suspicious system calls, accessing files like ~/.ssh/ or ~/.aws/credentials, or spawning shells. This aligns with D3FEND's Process Analysis (D3-PA).File Analysis (D3-FA) to monitor for significant, unexpected changes in package file sizes within your node_modules directory, such as a 25x increase in an index.js file.Organizations must harden their software development and dependency management practices.
Application Configuration Hardening (D3-ACH).environment protection rules to control which workflows can access secrets or publish artifacts.package-lock.json).User Training (M1017).GitHub announces NPM v12 will disable automatic script execution by default, directly countering supply chain attacks like Shai-Hulud and TeamPCP.
Strictly manage and monitor permissions for developer accounts and CI/CD service principals to limit the blast radius of a compromise.
Harden the configuration of CI/CD platforms like GitHub Actions by enforcing branch protection, requiring reviewers, and limiting workflow triggers.
Mapped D3FEND Techniques:
Implement comprehensive logging and auditing for dependency management systems and CI/CD pipelines to detect anomalous behavior.
Run build processes, especially dependency installation, in isolated, ephemeral environments to prevent access to sensitive network resources or files.
Enforce MFA on all developer accounts for code repositories and package registries to prevent simple credential compromise.
Mapped D3FEND Techniques:
While the attack involves malicious updates, maintaining a rigorous process for vetting and applying legitimate updates (patches) to tooling and dependencies is crucial.
Mapped D3FEND Techniques:
In the context of the npm supply chain attacks, Application Configuration Hardening should be applied directly to the CI/CD platform, such as GitHub Actions. First, enforce strict branch protection rules on all production branches, requiring pull requests with at least one or two mandatory reviewers before merging. This directly counters the technique used in the Red Hat attack where an attacker pushed malicious commits directly. Second, leverage environment protection rules in GitHub Actions. Create a 'production' or 'publish' environment and configure it to require manual approval before a workflow can access secrets (like an NPM_TOKEN) or deploy. This adds a human verification step, preventing an automated worm from publishing malicious packages. Finally, harden the workflow trigger definitions. Disable pull_request_target triggers on public repositories unless absolutely necessary and fully understood, as they can be insecure. Instead, use triggers like workflow_dispatch for manual runs or pull_request on forks, which run with read-only tokens by default. These configurations create critical gates that disrupt the automated attack chain used by malware like Miasma.
To counter threats like Mini Shai-Hulud that execute during package installation, organizations should implement dynamic analysis by running npm install within a sandboxed environment before allowing new or updated dependencies into their main development workflow. This can be automated as part of a 'dependency quarantine' process. The sandbox should be an ephemeral, network-restricted container with extensive monitoring. During the analysis, security teams should monitor for specific malicious behaviors: 1) Network callouts to unknown domains, which could indicate C2 communication or credential exfiltration. 2) Filesystem access outside the project directory, especially attempts to read ~/.ssh/, ~/.aws/credentials, or ~/.npmrc. 3) Spawning of unexpected child processes, such as shells (sh, bash), curl, or powershell. Any dependency that exhibits these behaviors during the sandboxed installation should be immediately flagged, blocked, and investigated. This proactive analysis acts as a crucial defense layer, catching malicious pre/post-install scripts before they can execute on a developer's machine or in a production build pipeline.
Given that these attacks leverage compromised developer accounts, Domain Account Monitoring should be extended to federated identities on platforms like GitHub and npm. Security teams must ingest audit logs from these platforms into their SIEM. Create high-fidelity alerts for suspicious account activity, such as: 1) Logins from new or geographically anomalous locations. 2) A sudden, high-volume of commits or package publications from a single account, as seen with the TanStack compromise where 84 artifacts were published in minutes. 3) The creation of forked repositories with deliberately misleading names (e.g., zblgg/configuration from the report). 4) Commits authored by a spoofed user identity that does not match the committer's account. Establishing a baseline of normal developer activity is key. By monitoring for deviations, security teams can quickly detect a compromised developer account and disable it, containing the threat before it can be used to inject malicious code into a trusted supply chain.
The Shai-Hulud worm emerges, marking a shift to high-consequence npm attacks.
A new campaign begins, including the string 'Shai-Hulud: The Third Coming'.
The 'Mini Shai-Hulud' campaign is initiated.
An attacker creates a malicious fork of the TanStack/router repository.
TeamPCP launches a coordinated supply chain attack on npm and PyPI via TanStack's CI pipeline.
TeamPCP open-sources the Mini Shai-Hulud malware, enabling copycat attacks.
A supply chain attack compromises at least 32 packages in the @redhat-cloud-services npm namespace using the Miasma payload.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.