# Over 320 NPM Packages Compromised in Fresh Mini Shai-Hulud Supply Chain Attack
A massive supply chain attack has compromised the npm maintainer account 'atool' and leveraged it to distribute malicious code across 320+ packages, including two extraordinarily popular libraries used by millions of developers worldwide. The attack represents the latest iteration of the Mini Shai-Hulud campaign—a sophisticated, multi-stage operation designed to steal cloud credentials, CI/CD secrets, and cryptocurrency wallets from compromised systems.
## The Threat
Security researchers at Socket, Wiz, StepSecurity, and Microsoft have confirmed that the compromised account, which maintains packages across the @antv namespace, was used to publish at least 639 malicious versions of affected packages. Two particularly high-impact targets were compromised:
The malicious versions were published with obfuscated payloads designed to execute during installation, triggering a multi-stage infection chain that downloads additional payloads from attacker-controlled GitHub repositories.
"The attack propagated downstream to other highly popular packages, impacting a much broader set of applications and continuous integration (CI) environments," Microsoft warned in its official analysis.
## Campaign Scale and Scope
This compromised npm account is part of a much larger campaign tracked as Mini Shai-Hulud:
| Metric | Count |
|--------|-------|
| Total malicious versions identified | 1,055 |
| Unique packages affected | 502 |
| NPM versions (primary target) | 1,048 versions across 498 packages |
| PyPI packages compromised | 6 versions across 3 packages |
| Composer packages compromised | 1 package-version entry |
| GitHub repositories containing exfiltrated data | 2,200+ |
The overwhelming majority of the activity targets the npm ecosystem, making this attack one of the most extensive supply chain compromises in recent memory.
## Background and Context
### What is Mini Shai-Hulud?
Mini Shai-Hulud is an ongoing supply chain attack campaign that has been systematically compromising developer tool packages across multiple package ecosystems. The campaign is notable for its sophisticated credential harvesting and multi-stage payload delivery mechanisms.
Named after a creature from Frank Herbert's science fiction, the campaign earned its designation due to its secretive, pervasive nature—spreading through package registries like sand through a desert. Previous iterations have hit packages across npm, PyPI, and PHP Composer, always with the same malicious objectives: stealing credentials and establishing persistence.
### Attribution to TeamPCP
Security researchers attribute this attack campaign to TeamPCP, a hacking group known for supply chain attacks. The attribution is based on several technical indicators:
## Technical Details
### The Multi-Stage Attack Chain
The malicious payload follows a sophisticated infection process:
Stage 1: Installation Trigger
npm installStage 2: Credential Harvesting
The payload systematically searches and steals credentials from over 130 file paths, including:
### GitHub Actions Memory Extraction
One of the most dangerous capabilities the malware possesses is the ability to extract masked secrets from GitHub Actions runner memory in plaintext.
GitHub Actions runners employ masking to hide secrets in logs—but the malware reads the runner process memory directly, bypassing this security layer entirely. This gives attackers access to unmasked AWS keys, deployment tokens, and other high-value secrets.
### NPM Registry Abuse Logic
The compromised packages include logic to:
This creates a cascading compromise scenario where a single compromised account can be weaponized to spread malware through an entire namespace of related packages—which is exactly what occurred with the @antv namespace.
### Python Execution and Backdoors
Unlike previous Mini Shai-Hulud campaigns, this variant includes capabilities not seen before:
## Affected Packages and Services
Beyond the @antv namespace, the compromise extended to other critical infrastructure:
## Implications for Organizations
### Immediate Risk
Organizations using any of the 320+ affected packages face several critical risks:
1. Credential theft: If developers installed the malicious versions, attackers have extracted all credentials on those machines
2. CI/CD compromise: GitHub Actions runners have been compromised and their secrets stolen
3. Lateral movement: Stolen cloud credentials could allow attackers to access production environments
4. Supply chain extension: Compromised npm tokens mean attackers may have republished malicious versions of additional packages
### Downstream Impact
Given the enormous popularity of affected packages like timeago.js and echarts-for-react, this attack likely compromised:
### Long Tail Risk
Even organizations that have patched or removed affected packages face ongoing risk. The 2,200+ GitHub repositories containing exfiltrated credentials mean attackers have access to:
## Recommendations
### For Developers and DevOps Teams
Immediate actions:
Medium-term mitigations:
Long-term hardening:
### For Security Teams
## HackWire Analysis
This attack reveals a critical vulnerability in how modern software supply chains operate: a single compromised maintainer account can compromise hundreds of downstream packages simultaneously. Unlike previous supply chain attacks that targeted individual packages, this campaign weaponized the trust placed in @antv namespace packages to achieve cascade compromise.
The technical sophistication is particularly concerning. The ability to extract plaintext secrets from GitHub Actions runner memory—defeating GitHub's masking protections—represents a new escalation in CI/CD targeting. For years, developers have relied on platform-provided secret masking as a defensive control. This attack demonstrates that's insufficient against determined adversaries with code execution.
What's also notable is the pattern: TeamPCP has now successfully compromised multiple major package ecosystems (npm, PyPI, Composer) using similar techniques. This suggests they have systematic intelligence about package maintainer workflows and common credential locations. Organizations need to assume that credential harvesting from developer machines is now a standard attack objective, not an exotic concern.
The shift toward Python code execution and Claude Code backdoors signals that attackers aren't content with one-time credential theft—they're establishing persistent footholds for ongoing access. This transforms the compromise from a discrete incident into a potential long-term breach.
For developers, the core lesson is uncomfortable: installing dependencies should now be treated with the same caution as running untrusted code, because at scale, it effectively is. The npm ecosystem's convenience—installing with a single command—has created an environment where malware can propagate to millions of machines through trusted channels before detection. Until package repositories implement stronger verification mechanisms or the ecosystem shifts toward more restrictive trust models, supply chain attacks will remain a dominant threat vector.
— HackWire Editorial
## Related Coverage