# Shai Hulud Supply-Chain Campaign Compromises 400+ Packages with Signed Malicious Code
A sophisticated supply-chain attack targeting Node.js and Python developers has weaponized cryptographic trust itself, delivering credential-stealing malware through over 400 compromised packages signed with valid provenance attestations. The campaign, attributed to the TeamPCP threat group and dubbed Shai Hulud, has exposed the critical gap between cryptographic verification and actual code integrity.
## The Threat
The latest iteration of the Shai Hulud campaign, escalated on May 11, 2026, compromised hundreds of widely-used developer packages across multiple ecosystems:
The attack chain began with TanStack and Mistral AI packages before spreading to other critical projects including Bitwarden CLI, Guardrails AI, UiPath, OpenSearch, and official SAP packages. From a developer's perspective, these packages appeared completely legitimate—they carried valid cryptographic signatures, SLSA Build Level 3 provenance attestations, and authentic GitHub Actions signatures.
The malware payload targets an extensive array of sensitive credentials:
| Credential Type | Target Systems |
|---|---|
| Authentication Tokens | GitHub Actions OIDC tokens, PATs, npm publish tokens |
| Cloud Infrastructure | AWS Secrets Manager, IAM credentials, ECS task credentials |
| Container Orchestration | Kubernetes service account tokens, cluster credentials |
| Infrastructure as Code | HashiCorp Vault tokens, SSH keys |
| Development Tools | Claude Code configurations, VS Code tasks, .env files |
| Blockchain Assets | Cryptocurrency wallet credentials |
The malware scans more than 100 file paths to extract credentials from cloud providers, cryptocurrency wallets, and messaging applications, then exfiltrates data via the Session P2P encrypted network—a technique that masks command-and-control traffic as legitimate messenger communications.
## Background and Context
The Shai Hulud campaign is not new. It emerged in September 2025 and has evolved through multiple iterations, each time growing more sophisticated and expanding its reach. What makes the current wave particularly alarming is the abuse of legitimate security infrastructure—the very mechanisms designed to prevent exactly these kinds of attacks.
The attackers exploited three chained vulnerabilities in the TanStack development workflow:
1. Risky pull_request_target configuration: This GitHub Actions trigger runs with elevated permissions for pull requests from forks, allowing untrusted code to access repository secrets
2. GitHub Actions cache poisoning: Attackers poisoned the build cache with malicious dependencies, injecting code into subsequent builds
3. OIDC token theft: The attackers extracted valid OpenID Connect tokens directly from runner memory during the build process
These stolen OIDC tokens allowed the attackers to impersonate the legitimate TanStack CI/CD pipeline and publish malicious package versions that appeared indistinguishable from legitimate releases.
## Technical Details: How the Attack Works
### Cryptographic Deception
The most insidious aspect of this campaign is its exploitation of trust mechanisms. The malicious packages included:
This created a situation where security scanners, provenance verification tools, and manual code reviews would all confirm the packages as authentic—yet they contained malware.
### The Git Commit Trick
Endor Labs researchers identified a clever technique where attackers pushed malicious commits to a fork, then referenced them via optional dependencies. Even though the commits didn't belong to any active branch, GitHub's shared fork object storage made them accessible—allowing npm to fetch and execute attacker-controlled code during installation.
### Persistence Mechanism
Unlike simple malware that disappears when the package is uninstalled, the Shai Hulud payload achieves persistence by injecting itself into development tool configurations:
An infected developer's entire development environment becomes a persistent attack surface, automatically exfiltrating credentials from every build, deployment, and development activity.
### Self-Propagation
Once a maintainer is compromised, the malware uses their stolen credentials to:
1. Enumerate all packages maintained by that developer
2. Modify package tarballs to inject the malicious payload
3. Republish infected versions with valid signatures
4. Repeat the cycle with newly compromised maintainers
This creates an expanding web of compromise where each newly infected developer becomes another vector for spreading the malware to their entire dependency chain.
## Implications for Organizations
### The Trust Collapse
This campaign reveals a fundamental vulnerability in modern software supply chains: cryptographic signatures no longer guarantee code integrity. An attacker with valid OIDC tokens can issue signatures that are cryptographically identical to legitimate ones. Traditional security controls—automated scanning, signature verification, provenance attestation—all failed to catch these attacks.
### Scope of Exposure
The attack primarily targets developers, but the blast radius extends far beyond:
Any organization whose developers installed these packages during the compromise window is potentially affected.
### The Credential Extraction Problem
The malware's ability to extract credentials from 100+ different file paths and environment sources means that a single compromised package can unlock:
## Recommendations
### Immediate Actions
Developers and Teams:
pull_request_target usage; prefer pull_request with careful secret handlingSecurity Teams:
### Long-Term Hardening
Supply Chain Security:
Credential Management:
Detection and Response:
---
## HackWire Analysis
The Shai Hulud campaign represents a watershed moment in supply-chain security: attackers have effectively learned to forge not just code signatures but the entire chain of custody. For years, the security industry has preached "verify provenance"—but this attack demonstrates that provenance verification becomes meaningless when the attestation authority itself is compromised.
What's particularly alarming is the targeting vector. Rather than attacking end users or production systems, these attackers are hunting developer credentials at the source—the moment when developers have legitimate access to the crown jewels of modern infrastructure (AWS keys, Kubernetes tokens, vault credentials, GitHub PATs). A single compromised developer machine becomes a master key to an organization's entire cloud infrastructure.
The use of Session P2P for exfiltration is a tactical choice that suggests sophisticated operational security. By masking malicious traffic as encrypted messenger communications, the attackers force defenders to choose between blocking legitimate privacy tools or accepting that adversary command-and-control will evade network detection.
The persistence mechanism—writing to Claude Code hooks and VS Code tasks—reveals that the attackers understand the modern developer toolkit intimately. They're not just distributing malware; they're embedding themselves into the development lifecycle itself. Uninstalling a malicious package isn't enough; you have to forensically examine every configuration file and initialization script.
For defenders, the critical lesson is this: you cannot trust downstream verification of supply-chain integrity alone. You must implement upstream controls—hermetic builds, OIDC token scoping, credential hygiene at the CI/CD level—before your packages ever reach npm. The era of "verify after publication" has ended.
— HackWire Editorial
---
## Related Coverage