Unit 42 Report: Shai-Hulud Worm's Evolution Leads to Advanced npm Supply Chain Attacks Targeting Red Hat and TanStack

npm Ecosystem Under Siege as Shai-Hulud Successors Weaponize CI/CD Pipelines

CRITICAL
June 3, 2026
July 3, 2026
23m read
Supply Chain AttackMalwareThreat Actor

Impact Scope

People Affected

520 million+ cumulative downloads (for TanStack incident)

Industries Affected

TechnologyCritical InfrastructureFinanceHealthcareGovernment

Related Entities(initial)

Threat Actors

TeamPCP

Organizations

Palo Alto NetworksUnit 42

Products & Tech

BitwardenGitHubOpenID ConnectPyPISLSAnpm

Other

CheckmarxMiasmaMini Shai-HuludRed HatShai-HuludTanStack

Full Report(when first published)

Executive Summary

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.


Threat Overview

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:

  1. 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.

  2. 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.

  3. 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.


Technical Analysis

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:

  1. Initial Access: Achieved through compromised developer credentials (T1078 - Valid Accounts) or by exploiting misconfigurations in CI/CD environments, as seen in the credential-free TanStack attack.
  2. CI/CD Abuse: Attackers trigger CI workflows (e.g., GitHub Actions) to gain temporary, but powerful, permissions. In the Red Hat attack, this involved requesting OIDC tokens (T1134 - Access Token Manipulation) to publish packages to the npm registry.
  3. Code Injection: Malicious code is injected into the project's source files before the build step. The Miasma payload was a heavily obfuscated index.js file, increasing its size by 25x—a potential detection indicator.
  4. Malicious Package Publication: The compromised CI/CD pipeline builds and publishes the trojanized package (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.
  5. Execution and Payload Delivery: When a developer installs the malicious package via npm install, the malicious scripts execute (T1059.007 - JavaScript/JScript). The payload then activates, initiating credential theft and propagation.
  6. Credential Theft: The malware scours the victim's machine and environment variables for sensitive credentials, including API keys for AWS, Google Cloud, Azure, and tokens for npm and GitHub (T1555 - Credentials from Password Stores).
  7. Propagation: The worm uses stolen npm tokens to backdoor every package the compromised developer has publish rights to, repeating the cycle.

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.


Impact Assessment

The business impact of these attacks is severe and multi-faceted, extending far beyond the initial victims.

  • Erosion of Trust: These attacks undermine the trust-based model of open-source software. When even packages from reputable publishers like Red Hat, signed with valid provenance, can be trojanized, it creates uncertainty for all developers.
  • Massive Downstream Risk: The compromise of a single popular package can lead to a cascading failure across thousands of organizations. The TanStack incident, affecting an estimated 520 million downloads, highlights the potential for widespread secondary breaches.
  • Credential Compromise: The primary goal of stealing credentials from developer machines and CI/CD environments provides attackers with keys to the kingdom, enabling lateral movement, data exfiltration, and further, more damaging attacks against the victim organization.
  • Remediation Costs: Organizations must expend significant resources to identify all instances of the malicious packages, revoke compromised credentials, audit their codebases, and restore trust in their build pipelines.
  • Brand and Reputational Damage: For publishers like Red Hat and TanStack, these incidents cause significant reputational harm, even if they were themselves victims of a sophisticated attack.

IOCs — Directly from Articles

The source article focuses on TTPs rather than traditional IOCs. However, the following contextual indicators were mentioned:

Type
File Name
Value
@bitwarden/cli
Description
Malicious package impersonating the legitimate Bitwarden CLI.
Type
Other
Value
2026.4.0
Description
Malicious version of the @bitwarden/cli package.
Type
Other
Value
@redhat-cloud-services
Description
The npm namespace under which 32 malicious packages were published.
Type
String Pattern
Value
Shai-Hulud: The Third Coming
Description
A string found within public GitHub repositories as part of a campaign.
Type
String Pattern
Value
Miasma: The Spreading Blight
Description
Description used by the attacker in newly created GitHub repositories.

Cyber Observables — Hunting Hints

Security teams may want to hunt for the following patterns, which could indicate related activity:

Type
File Name
Value
index.js
Description
Unusually large or heavily obfuscated index.js files in node_modules directories.
Context
File Integrity Monitoring, Static Analysis
Confidence
high
Type
Command Line Pattern
Value
npm install
Description
Monitor for npm install processes that spawn unexpected child processes (e.g., curl, bash, powershell).
Context
EDR, Process Auditing (Event ID 4688)
Confidence
high
Type
Log Source
Value
GitHub Actions logs
Description
Audit logs for OIDC token requests from forked repositories or unexpected workflows.
Context
GitHub Enterprise Audit Logs
Confidence
high
Type
Network Traffic Pattern
Value
build-server -> external-storage
Description
Anomalous network connections from CI/CD runners or build servers to unknown external IPs or cloud storage providers.
Context
Netflow, Firewall Logs
Confidence
medium
Type
File Path
Value
~/.npmrc
Description
Monitor for unauthorized read/access attempts to the npm configuration file, which stores authentication tokens.
Context
EDR, File Auditing
Confidence
high
Type
Registry Key
Value
HKCU\Software\npm
Description
On Windows, monitor for suspicious modifications to npm-related registry keys.
Context
EDR, Registry Monitoring
Confidence
medium

Detection & Response

Detecting these attacks requires a defense-in-depth approach focused on the software development lifecycle.

  • Dependency Scanning: Implement automated dependency analysis tools (e.g., Snyk, Dependabot, GitHub Advanced Security) to scan for known malicious packages. However, this is insufficient for zero-day attacks.
  • Behavioral Analysis: Use sandboxed environments to run 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.
  • CI/CD Log Monitoring: Actively monitor CI/CD logs for anomalies. Create SIEM alerts for:
    • Builds initiated by suspicious users or from forked repositories.
    • Sudden spikes in package publications.
    • GitHub Actions workflows requesting OIDC tokens outside of expected patterns.
  • Endpoint Detection (EDR): On developer workstations, EDR solutions can detect 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 Integrity Monitoring: Use 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.

Mitigation

Organizations must harden their software development and dependency management practices.

  • Enforce MFA on Registries: Mandate multi-factor authentication for all developer accounts on package registries like npm and code hosting platforms like GitHub.
  • Harden CI/CD Pipelines:
    1. Implement strict branch protection rules and require multiple reviewers for all code changes, especially to CI/CD configuration files. This is a form of Application Configuration Hardening (D3-ACH).
    2. Use GitHub Actions features like environment protection rules to control which workflows can access secrets or publish artifacts.
    3. Tightly scope the permissions of CI/CD tokens to the minimum required for their task.
  • Dependency Management:
    1. Pin dependencies to specific, vetted versions using a lockfile (package-lock.json).
    2. Use a private or scoped npm registry to host vetted internal and third-party packages, reducing exposure to the public registry.
    3. Implement a quarantine process where new package versions are analyzed in a sandbox before being approved for use.
  • Developer Training: Educate developers on the risks of supply chain attacks, credential phishing, and the importance of securing their accounts and workstations. This maps to MITRE's User Training (M1017).

Timeline of Events

1
September 1, 2025
The Shai-Hulud worm emerges, marking a shift to high-consequence npm attacks.
2
April 22, 2026
A new campaign begins, including the string 'Shai-Hulud: The Third Coming'.
3
April 29, 2026
The 'Mini Shai-Hulud' campaign is initiated.
4
May 10, 2026
An attacker creates a malicious fork of the TanStack/router repository.
5
May 11, 2026
TeamPCP launches a coordinated supply chain attack on npm and PyPI via TanStack's CI pipeline.
6
May 12, 2026
TeamPCP open-sources the Mini Shai-Hulud malware, enabling copycat attacks.
7
June 1, 2026
A supply chain attack compromises at least 32 packages in the @redhat-cloud-services npm namespace using the Miasma payload.
8
June 3, 2026
This article was published

Article Updates

June 14, 2026

Severity decreased

GitHub announces NPM v12 will disable automatic script execution by default, directly countering supply chain attacks like Shai-Hulud and TeamPCP.

GitHub has announced a critical security update for the npm ecosystem. The upcoming NPM version 12, expected in July, will no longer automatically execute 'preinstall', 'install', and 'postinstall' scripts from dependencies. This change directly addresses the supply chain attacks, including those by the 'Shai-Hulud' worm and 'TeamPCP', which have exploited this feature to inject malicious payloads. Developers will now need to explicitly enable script execution, shifting to an opt-in security model and significantly reducing the primary infection vector for such attacks. This is a major step in hardening the software supply chain against the types of compromises seen with Red Hat and TanStack.

June 26, 2026

Severity increased

Attack expands to Go ecosystem, compromises popular GitHub Action, and introduces Hades malware, increasing scope and impact.

The persistent supply chain attack, involving Miasma and Mini Shai-Hulud, has expanded its targeting to include the Go programming language ecosystem. A new malware family, Hades, has been identified. Attackers recently hijacked the 'semantic-release-action' GitHub Action on June 24, 2026, by force-pushing a malicious commit, leading to widespread credential theft and propagation. New techniques include a dead drop resolver using specific strings like 'firedalazer' for dynamic payload updates and AES-128-GCM for exfiltration, indicating increased sophistication and broader reach.

July 3, 2026

Severity increased

TeamPCP has partnered with the VECT ransomware group, creating an 'industrialized ransomware' model. TeamPCP now funnels stolen developer credentials from supply chain attacks on tools like Trivy to VECT affiliates for ransomware deployment, significantly escalating the threat.

TeamPCP, known for npm supply chain attacks, has formed a dangerous alliance with the VECT ransomware-as-a-service group. TeamPCP now specializes in stealing developer credentials (cloud tokens, SSH keys) by compromising popular developer tools such as Trivy, KICS, and LiteLLM. These high-value credentials are then supplied to VECT affiliates, enabling them to bypass initial access and directly deploy ransomware. This 'industrialized ransomware' model significantly increases the speed, scale, and targeted nature of attacks, posing a severe escalation for organizations whose developers use these compromised tools. The FBI warns of widespread risk, with one attack on Trivy alone compromising over 500,000 credentials.

Timeline of Events

1
September 1, 2025

The Shai-Hulud worm emerges, marking a shift to high-consequence npm attacks.

2
April 22, 2026

A new campaign begins, including the string 'Shai-Hulud: The Third Coming'.

3
April 29, 2026

The 'Mini Shai-Hulud' campaign is initiated.

4
May 10, 2026

An attacker creates a malicious fork of the TanStack/router repository.

5
May 11, 2026

TeamPCP launches a coordinated supply chain attack on npm and PyPI via TanStack's CI pipeline.

6
May 12, 2026

TeamPCP open-sources the Mini Shai-Hulud malware, enabling copycat attacks.

7
June 1, 2026

A supply chain attack compromises at least 32 packages in the @redhat-cloud-services npm namespace using the Miasma payload.

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

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.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Editorial Standards & Analyst Review

CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.

Tags

CI/CDGitHub ActionsMiasmaShai-HuludTeamPCPcredential theftmalwarenpmopen source securitysupply chain attackworm

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

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.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

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 Generator

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.