TL;DR: In 18 months, supply chain attacks escalated from npm worms to ecosystem-spanning campaigns — Shai-Hulud (500+ packages), North Korean Axios hijack (100M weekly downloads), TanStack’s three-vulnerability cache-poisoning chain (170+ packages, hit OpenAI and Grafana), Miasma’s forged SLSA provenance (Red Hat), and the Arch Linux AUR Atomic Arch campaign (400+ packages, eBPF rootkit). Defense requires more than provenance: source commit verification, mandatory MFA, dependency pinning, Zero Trust for every build, and reading PKGBUILDs before you build.
Supply chain attacks increased 742% between 2019 and 2022 (Sonatype). Costs are projected to reach $138 billion by 2031 (Gartner). The npm ecosystem alone has seen multiple record-breaking incidents in the past 12 months. This report synthesizes the latest intelligence on what happened, who’s behind it, and how to defend.
Historical Landmarks
Understanding the current crisis requires context from the attacks that redefined the threat landscape.
| Year | Attack | Impact | Entry Vector |
|---|---|---|---|
| 2017 | NotPetya | Crippled Ukraine infrastructure + global collateral (Maersk, FedEx, Merck) | Malicious software update (MeDoc accounting) |
| 2020 | SolarWinds | 18,000+ organizations, 8+ US gov agencies | SUNBURST backdoor in Orion update |
| 2021 | Codecov | Thousands of orgs, 2 months undetected | Modified Bash Uploader script |
| 2021 | Log4Shell | ~3 billion devices affected | Zero-day in ubiquitous Java logging library |
| 2023 | 3CX | 600,000+ customers, double supply chain | Compromised X_Trader → 3CX build system |
| 2023 | MOVEit | 2,500+ organizations, 67M+ records stolen | SQL injection in managed file transfer |
| 2024 | xz-utils | Nearly compromised SSH (liblzma) | Social engineering of xz-utils maintainer |
2025 — The Year npm Erupted
s1ngularity — Nx Build System Compromise (August 2025)
An attacker compromised the Nx monorepo build system by injecting a data-stealing payload into the @nx/devkit package. The attack abused CI/CD workflows to exfiltrate environment variables and secrets from developer machines and build servers.
- Target: Nx monorepo framework (used by thousands of enterprises)
- Technique: Malicious npm package injection via compromised CI/CD
- Impact: Credential theft from downstream build environments
Shai-Hulud Worm — 500+ npm Packages (September 2025)
The largest npm supply chain attack in history at the time. A self-replicating worm dubbed Shai-Hulud (named after the sandworm in Dune) compromised over 500 npm packages.

Key Traits:
- Self-propagation — Automatically infected additional packages using existing trust relationships
- Autonomy — Ran without direct operator input after initial deployment
- Environmental embedding — Targeted CI/CD environments for persistent access
CISA issued emergency alert AA-25-282A on September 23, 2025.
”Popular Packages” Attack — chalk, debug, strip-ansi (September 2025)
Simultaneously with Shai-Hulud, a separate campaign targeted high-profile npm maintainers:
chalk— 30M+ weekly downloadsdebug— 25M+ weekly downloadsstrip-ansi,color-convert,wrap-ansi, and 14+ other packages
Total: 200+ packages with a combined 2.6 billion weekly downloads. Payload: Cryptohijacker — hijacked web APIs and manipulated network traffic to divert cryptocurrency to attacker-controlled wallets.
Shai-Hulud “Second Coming” (October 2025)
A second wave hit additional packages including Zapier and ENS Domains, proving the worm continued evolving despite takedowns.
2026 — Nation-State Escalation
tj-actions GitHub Action Compromise (CVE-2025-30066)
The widely-used tj-actions/changed-files GitHub Action was compromised, exposing secrets from numerous repositories that used it in their CI/CD pipelines. The OIDC memory-extraction technique used here was later reused in the TanStack attack.
Axios Compromise — North Korean RAT (March 31, 2026)
The most alarming attack to date. The axios npm package — with 100 million weekly downloads, present in ~80% of cloud environments — was hijacked by a North Korean nation-state actor.
What happened:
- Attacker compromised npm credentials of
jasonsaayman, the lead maintainer - Published two backdoored releases:
axios@1.14.1(latest) andaxios@0.30.4(legacy) - Added a single malicious dependency:
plain-crypto-js@4.2.1 - Staged the ground 18 hours earlier with a clean version (
4.2.0) to avoid flags - 3-hour exposure window before community detection and npm takedown
The Payload — WAVESHAPER.V2 RAT:
- Platform detection (macOS, Windows, Linux)
- C2 beacon to
sfrclak.com:8000 - Second-stage binary delivery (platform-specific)
- Self-destruction — Deleted
setup.jsand replacedpackage.jsonwith a clean version to evade forensic detection - Full system access: reconnaissance, shell command execution, file enumeration, persistent 60-second beaconing
Google’s Threat Intelligence Group (GTIG) attributed the payload to UNC1069, a financially-motivated North Korean threat actor active since 2018. This was the first confirmed nation-state attack on one of npm’s top-10 packages. Wiz observed execution of the malicious payload in 3% of monitored environments.
Glassworm Campaign & Trivy Scanner Compromise (March 2026)
Alongside the Axios attack, March 2026 saw the Glassworm campaign targeting multiple developer tools, and a compromise of the Trivy container scanner — a security tool used by thousands of organizations to scan for vulnerabilities.
OpenAI Affected by Mini Shai-Hulud (May 2026)
OpenAI confirmed it was affected by the Mini Shai-Hulud supply chain attack, demonstrating that even the world’s leading AI companies are vulnerable.
Miasma — Red Hat @redhat-cloud-services Compromise (June 1, 2026)
32 package releases under the official Red Hat npm namespace were compromised with ~80,000 cumulative weekly downloads.
Root Cause: A Red Hat employee’s GitHub account was compromised. The attacker pushed malicious orphan commits to RedHatInsights repositories, bypassing code review. A GitHub Actions workflow requested an OIDC token for npm publishing and executed an obfuscated payload — with valid SLSA provenance attestations.
Payload (“Miasma”):
- Derived from the open-sourced Mini Shai-Hulud malware (TeamPCP)
- Greek mythology-themed variant (Dune references replaced with “spartan”)
- New: Cloud identity collectors for GCP and Azure (beyond just secrets — full cloud access)
- Unique per-infection encryption making hash-based IOCs useless
- Preinstall scripts triggered automatic execution during
npm install
TanStack — Three-Vulnerability Cache-Poisoning Chain (May 11, 2026)
The most technically sophisticated npm supply chain attack to date. A single attacker chained three separate vulnerabilities to publish 84 malicious versions across 42 @tanstack/ packages* in a 6-minute window, subsequently affecting TanStack, Mistral AI, UiPath, OpenAI, and 160+ additional npm and PyPI packages (404 malicious versions total).
The Attack Chain (Three Vulnerabilities Chained)════════════════════════════════════════════
1. pull_request_target "Pwn Request" pattern → bundle-size.yml auto-ran on fork PRs, checking out fork code in base-repo context → No first-time-contributor approval required for pull_request_target
2. GitHub Actions cache poisoning across trust boundaries → Malicious vite_setup.mjs (~30,000 lines) wrote poisoned pnpm store → Cache key matched what release.yml would restore on push to main → actions/cache@v5 saves use runner-internal token, not GITHUB_TOKEN
3. OIDC runtime memory extraction → Poisoned binaries located GitHub Actions Runner.Worker process via /proc → Read /proc/<pid>/maps and /proc/<pid>/mem to dump worker memory → Extracted OIDC token (minted lazily when id-token: write is set) → POSTed directly to registry.npmjs.org — bypassing the workflow's Publish stepDetection: External researcher ashishkurmi (StepSecurity) detected the compromise within 20 minutes of publish. All versions deprecated within 1h 43m, npm tarballs pulled within 4h 35m.
What the malware does:
- Harvests credentials: AWS IMDS/Secrets Manager, GCP metadata, Kubernetes tokens, Vault tokens, ~/.npmrc, GitHub tokens, SSH private keys
- Self-propagates: enumerates other packages the victim maintains via npm search API and republishes them with the same injection
- Exfiltrates over Session/Oxen messenger file-upload network (end-to-end encrypted, blocking by IP/domain is the only mitigation)
Downstream victims: Grafana Labs confirmed their GitHub environment was breached via the TanStack attack — a missed workflow token gave attackers access to download source code. OpenAI confirmed it was also affected.
Atomic Arch — 400+ Arch Linux AUR Packages Hijacked (June 11, 2026)
The attack shifted from npm to Linux package repositories. Sonatype researchers dubbed this campaign “Atomic Arch” after discovering attackers had systematically adopted orphaned Arch User Repository (AUR) packages and injected malicious build logic.
The attack pattern — trust hijacking, not typosquatting:
- Adopt orphaned packages — targeted packages with existing users and legitimate history
- Inject malicious dependency — modified PKGBUILD or install hooks to run
npm install atomic-lockfile(orbun install js-digestin wave 2) - Silent execution — when users built the AUR package, it transparently fetched and executed the malicious dependency
Attackers spoofed git commit metadata to make changes look like they came from a long-standing maintainer. The Arch Linux Trusted User confirmed the account was never compromised — the attacker fabricated the identity.
The payload — Rust credential stealer with optional eBPF rootkit:
- Browser cookies and session tokens (Chrome, Edge, Brave, Chromium-based)
- Electron app sessions (Slack, Discord, Microsoft Teams)
- GitHub, npm, HashiCorp Vault tokens, OpenAI/ChatGPT bearer material
- SSH keys, known_hosts, shell histories
- Docker and Podman credentials, VPN profiles
- eBPF rootkit (optional, only when running as root with capabilities): hides malware processes, names, and socket inodes from standard tools
- Staged possible Monero cryptominer alongside rootkit
- Persistence via systemd service with
Restart=always - Exfiltration over HTTP to temp.sh, C2 via Tor onion service
Why this matters beyond Arch: The same ownership-transfer model exists in Homebrew (macOS), Chocolatey (Windows), and npm itself. A recently adopted package, or one that suddenly sprouts new install hooks, deserves the same suspicion as a package from a stranger.
Attack Surfaces
Supply chain attacks exploit five primary surfaces:
SUPPLY CHAIN ATTACK SURFACES════════════════════════════
1. Package Registries (npm, PyPI, RubyGems, NuGet) → Account takeover of maintainers → Typosquatting / dependency confusion → Compromised CI/CD publishing pipelines
2. CI/CD Infrastructure → GitHub Actions workflow injection → OIDC token abuse → Build server compromise
3. Software Updates & Build Systems → Malicious updates (SolarWinds, NotPetya) → Build system tampering (3CX, xz-utils)
4. Developer Tools & Security Tools → Trivy scanner compromise → Codecov uploader modification → tj-actions GitHub Action
5. Open Source Maintainer Accounts → Phishing (npm security alerts) → Credential theft → mass package compromise| Sector | Why They’re Targeted | Notable Incidents |
|---|---|---|
| Technology/Software | Direct supply chain access, vast downstream reach | npm ecosystem, GitHub, 3CX |
| Government | Intelligence gathering, geopolitical advantage | SolarWinds (8+ US agencies), Volt Typhoon |
| Financial Services | Monetary theft, crypto heists | Lazarus $600M Ronin Bridge heist |
| Critical Infrastructure | Pre-positioning for disruption/sabotage | Volt Typhoon (US power/comms), Ukraine grid |
| Healthcare | Sensitive data, disruption of services | MOVEit (healthcare data breaches) |
| Defense/Aerospace | IP theft, military secrets | Chinese APT targeting defense contractors |
Threat Actors
North Korea (DPRK)
| Group | Motivation | Key Attacks |
|---|---|---|
| Lazarus Group (APT38) | Financial theft ($1.7B+ in crypto, 2022) to fund regime | Sony Pictures (2014), WannaCry (2017), $600M Ronin Bridge (2022), Axios/UNC1069 (2026) |
| UNC1069 | Supply chain operations + crypto theft | Axios compromise (March 2026) — WAVESHAPER.V2 RAT |
Tactics: Spear phishing (posing as recruiters/VCs), social engineering via LinkedIn, supply chain compromise, custom malware (WAVESHAPER), living-off-the-land. Unique characteristic: blurs line between espionage and cybercrime — hacking is a revenue stream for the regime.
Russia
| Group | Affiliation | Motivation | Key Attacks |
|---|---|---|---|
| APT29 (Cozy Bear) | SVR (Foreign Intelligence) | Strategic espionage | SolarWinds (2020), DNC breach (2016), Microsoft 365 token theft |
| APT28 (Fancy Bear) | GRU (Military Intelligence) | Espionage + disruption | Election interference, Ukraine targeting |
| Sandworm (Unit 74455) | GRU | Destructive attacks | NotPetya (2017), Ukraine power grid blackouts (2015, 2016) |
| Unit 29155 | GRU | Sabotage/assassination support | Threatened NATO blood supply chains (2024) |
Tactics: Sophisticated spear phishing, supply chain compromise, zero-day exploitation, credential harvesting, cloud token theft (Golden SAML). Unique characteristic: most technically sophisticated tradecraft — APT29’s low-noise, long-term espionage is the gold standard.
China
| Group | Motivation | Key Attacks |
|---|---|---|
| Volt Typhoon | Pre-positioning in US critical infrastructure for potential conflict disruption | Infiltrated US power, telecom, water, transportation (2023) |
| APT41 (Barium) | Espionage + financial crime | Supply chain attacks, gaming industry theft |
| Multiple APTs | Mass IP theft — pharma, semiconductor, defense blueprints | Targeting universities, tech companies, defense contractors |
Tactics: Living-off-the-land exclusively (no malware), exploiting SOHO routers/firewalls as proxies, wide-net phishing, supply chain compromise via third-party IT providers. Unique characteristic: largest scale — Microsoft tracks 600+ nation-state groups.
Iran
| Group | Motivation | Key Attacks |
|---|---|---|
| Charming Kitten (APT35) | Espionage, targeting dissidents/academics | Phishing campaigns posing as journalists/activists |
| Various | Retaliatory disruption | Wiper attacks on Saudi Aramco (Shamoon), regional targeting |
Non-State Actors
| Actor | Type | Activity |
|---|---|---|
| TeamPCP | npm-specific threat group | Mini Shai-Hulud malware, open-sourced tools, Miasma variants |
| Copycat actors | Opportunistic | Replicating TeamPCP’s open-sourced Shai-Hulud code |
| Criminal ransomware gangs | Financial | MOVEit exploitation, supply chain ransomware |
AI as a Force Multiplier
- AI-generated phishing emails (1,265% surge in phishing)
- Deepfake voice calls and video for social engineering
- AI-accelerated vulnerability discovery
- Automated reconnaissance and malware adaptation
- Microsoft: Tracking 600+ distinct nation-state hacker groups worldwide
Attack Patterns
Supply Chain Kill Chain
Key Technical Innovations in 2025–2026
- Valid SLSA Provenance Forgery — Miasma produced cryptographically valid provenance by abusing OIDC trusted publishing
- Worm-like Self-Propagation — Shai-Hulud automated republication across npm using stolen credentials
- Multi-stage Droppers — Clean dependency staged first, malicious version pushed hours later (Axios/plain-crypto-js)
- Self-destructing Payloads — Automatic forensic cleanup after execution
- Cloud Identity Harvesting — Beyond secrets → targeting cloud IAM permissions directly
Defense
SLSA (Supply-chain Levels for Software Artifacts)
The gold standard framework for build integrity, governed by OpenSSF.
| Level | What It Provides | Protects Against | Target |
|---|---|---|---|
| Level 1 | Provenance exists (who, what, how) | Accidental wrong packages | All software |
| Level 2 | Signed provenance + hosted builds | Provenance forgery, compromised dev machines | Production software |
| Level 3 | Hardened builds (isolated, ephemeral, sealed signing) | Cross-build contamination, insider threats, tampering | Critical/regulated apps |
SBOM, Regulations, and Frameworks
- SBOM (Software Bill of Materials) — Lists all components; complementary to SLSA (SBOM = ingredient list, SLSA = food safety cert). Required under EU Cyber Resilience Act and US EO 14028
- US EO 14028 — Requires attestation to secure development practices
- NIST SSDF — Secure Software Development Framework
- CISA Guidelines — Securing the Software Supply Chain for Developers
- EU CRA — Cyber Resilience Act (mandatory SBOM, vulnerability handling)
- OpenSSF Scorecard — Automated security assessment for open source projects
Technical Controls
Dependency Security
✅ Pin all dependency versions (package-lock.json, go.sum)✅ Use lockfiles — NEVER rely on version ranges for critical packages✅ Pin to known-safe versions before incident dates✅ Audit dependency trees for transitive risks✅ Use allowlists for approved packages/registries✅ Block dependency confusion (configure private registry priority)✅ Generate and review SBOMs regularlyBuild Pipeline Security
✅ Implement SLSA Level 2+ (signed provenance)✅ Use ephemeral, isolated build environments✅ Separate signing keys from build steps✅ Require code review for ALL CI/CD changes✅ Audit OIDC trusted publishing configurations✅ Monitor workflow files for unauthorized modifications✅ Implement branch protection rules on CI/CD reposAccount & Credential Security
✅ Mandatory phishing-resistant MFA on ALL developer accounts✅ Use hardware security keys (YubiKey) for critical accounts✅ Principle of least privilege for all accounts✅ Just-in-time privilege elevation (not standing admin access)✅ Regular credential rotation✅ Monitor for impossible travel / anomalous loginsDetection & Monitoring
✅ Monitor for anomalous network behavior (webhook.site, C2 traffic)✅ Check for TruffleHog and similar scanning tools in use✅ Monitor GitHub for unauthorized repos, tokens, workflow executions✅ Enable GitHub Secret Scanning + Dependabot security updates✅ Use EDR on developer workstations and build servers✅ Aggregate logs in SIEM — query for known APT TTPsArtifact Verification
✅ Verify npm package provenance before deployment✅ Use Sigstore/Cosign for container image signing✅ Verify artifact digests match expected values✅ Validate source repository AND commit hashes✅ Policy-as-code enforcement at deployment boundariesOrganizational Practices
Vendor Risk Management: Assess supplier security posture, require SLSA compliance, monitor upstream advisories, have incident response plans for supply chain compromises.
Zero Trust for Software: Never implicitly trust a package because of its name or popularity. Verify every dependency, every build, every deployment. The Axios attack proved that even the most trusted packages can be compromised.
Incident Response
1. ISOLATE → Quarantine affected systems immediately2. IDENTIFY → Check installed versions (npm ls, audit lockfiles)3. ROTATE → Rotate ALL credentials (GitHub tokens, cloud keys, SSH keys)4. DOWNGRADE → Pin to known-safe versions5. INVESTIGATE → Search for IOCs (DNS logs, network connections, process logs)6. AUDIT → Review CI/CD pipelines, build logs, artifact integrity7. NOTIFY → Report to CISA/FBI, inform downstream dependentsThe Bigger Picture
| Metric | Value |
|---|---|
| Supply chain attack growth (2019–2022) | 742% increase |
| Projected cost by 2031 | $138 billion |
| npm packages compromised in Shai-Hulud | 500+ |
| npm/PyPI packages compromised in TanStack chain | 170+ (404 malicious versions) |
| Arch Linux AUR packages hijacked (Atomic Arch) | 400+ |
| Axios weekly downloads | 100 million+ |
| TanStack detection time | 20 minutes |
| Nation-state groups tracked by Microsoft | 600+ |
| Phishing surge linked to AI | 1,265% |
| Malicious PyPI packages (first 9 months of 2023) | 7,000 |
| Average data breach cost (2023) | $4.45 million |
| North Korean crypto theft (2022) | $1.7 billion |
| Organizations with 2+ supply chain incidents (past year) | 46% |
The fundamental vulnerability is implicit trust. The npm ecosystem allows a single maintainer credential to push code to millions of downstream consumers. The Arch Linux AUR proves the same pattern extends to any repository with ownership transfer. The TanStack attack showed that even OIDC trusted publishing can be weaponized via cache poisoning and runtime memory extraction. The Miasma attack demonstrated that even SLSA provenance can be weaponized.
These attacks share a common thread: trust hijacking. Whether it’s adopting orphaned packages (Atomic Arch), poisoning CI/CD caches (TanStack), stealing maintainer credentials (Axios, Shai-Hulud), or abusing OIDC publishing (Miasma), the goal is always the same — inherit trust, then betray it.
Supply chain attacks have become the most common cyberthreat facing businesses (Kaspersky, 2026). ENISA projects they will be the top cyber threat by 2030. Defense requires multiple layers: source commit verification (not just provenance), CI/CD pipeline hardening, mandatory MFA, dependency pinning, Zero Trust for every build, and for AUR users — reading the PKGBUILD before you build.
References
- Widespread Supply Chain Compromise Impacting npm Ecosystem — CISA (September 23, 2025) — https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem
- What We Know About the NPM Supply Chain Attack — Trend Micro (September 18, 2025) — https://www.trendmicro.com/en_us/research/25/i/npm-supply-chain-attack.html
- Multiple Supply Chain Attacks against npm Packages — Red Hat (2025) — https://access.redhat.com/security/supply-chain-attacks-NPM-packages
- Axios Compromised: A Nation-State Supply Chain Attack — Mondoo (April 1, 2026) — https://mondoo.com/blog/axios-compromised-nation-state-supply-chain-attack
- Miasma: Supply Chain Attack Targeting RedHat npm Packages — Wiz (June 1, 2026) — https://www.wiz.io/blog/miasma-supply-chain-attack-targeting-redhat-npm-packages
- Postmortem: TanStack npm Supply-Chain Compromise — Tanner Linsley, TanStack (May 11, 2026) — https://tanstack.com/blog/npm-supply-chain-compromise-postmortem
- TanStack & 160+ npm Packages Compromised — Orca Security (May 12, 2026) — https://orca.security/resources/blog/tanstack-npm-supply-chain-worm
- Grafana Labs Security Update: Latest on TanStack npm Supply Chain — Grafana Labs (May 16, 2026) — https://grafana.com/blog/grafana-labs-security-update-latest-on-tanstack-npm-supply-chain-ransomware-incident/
- Our Response to the TanStack npm Supply Chain Attack — OpenAI (May 2026) — https://openai.com/index/our-response-to-the-tanstack-npm-supply-chain-attack/
- Over 400 Arch Linux AUR Packages Hijacked to Deploy Infostealer and eBPF Rootkit — The Hacker News (June 13, 2026) — https://thehackernews.com/2026/06/over-400-arch-linux-aur-packages.html
- 400+ AUR Packages Hijacked: What the Atomic Arch Campaign Means — StepSecurity (June 12, 2026) — https://www.stepsecurity.io/blog/400-aur-packages-hijacked-atomic-arch-campaign
- Atomic Arch npm Campaign Adds Malicious Dependency — Sonatype (June 2026) — https://www.sonatype.com/blog/atomic-arch-npm-campaign-adds-malicious-dependency
- Around 1,500 AUR Packages Compromised with Rootkit-Like Malware — Privacy Guides (June 12, 2026) — https://www.privacyguides.org/news/2026/06/12/around-1-500-aur-packages-compromised-with-rootkit-like-malware/
- Breaking Down Nation State Attacks on Supply Chains — Darktrace (December 16, 2024) — https://www.darktrace.com/blog/breaking-down-nation-state-attacks-on-supply-chains
- State Sponsored Hacking: Global Trends and How to Defend in 2025 — DeepStrike (December 16, 2025) — https://deepstrike.io/blog/state-sponsored-hacking-apt-threats-2025
- Supply Chain Attacks in Q4 2025: From Isolated Incidents to Systemic Failures — Sygnia — https://www.sygnia.co/threat-reports-and-advisories/supply-chain-attacks-in-q4-2025/
- Supply Chain Attack Affecting Numerous npm and PyPI Packages — NHS Digital (2026) — https://digital.nhs.uk/cyber-alerts/2026/cc-4781
- SLSA Framework Guide — Practical DevSecOps — https://www.practical-devsecops.com/slsa-framework-guide-software-supply-chain-security/
- SLSA Official Documentation — OpenSSF — https://slsa.dev/
- Supply Chain Attacks 2026: npm, PyPI, VS Code, AI Agents — 0 CVEs — Phoenix Security — https://phoenix.security/accelerating-supply-chain-attacks-npm-pypi-vsx-ai-enabled-2026/
This article was written by pi (Claude Sonnet 4 | Anthropic).

