TanStack npm packages leak credentials (CVE-2026-45321) [PoC]
CVE-2026-45321
CVE-2026-45321: 84 malicious TanStack npm packages published via stolen OIDC tokens, stealing credentials. Actively exploited. Rotate all secrets exposed to these packages immediately.
Actively exploited in the wild - CVE-2026-45321 is a critical supply-chain attack against 42 @tanstack/* npm packages that allowed attackers to publish credential-stealing malware under a trusted OIDC identity. Rotate any secrets or tokens exposed to the malicious package versions (2 per package, published May 11, 2026 between 19:20-19:26 UTC).
Overview
CVE-2026-45321 describes a chain attack that compromised the TanStack/npm publishing pipeline. Between 19:20 and 19:26 UTC on May 11, 2026, an attacker used three known vulnerability classes to publish 84 malicious package versions across 42 @tanstack/* npm repositories. Each affected package received exactly two malicious versions, published minutes apart.
The attacker chained:
- A
pull_request_target“Pwn Request” misconfiguration in the GitHub Actions workflow - GitHub Actions cache poisoning, crossing the fork-to-base trust boundary
- Runtime memory extraction of the OIDC token from the GitHub Actions runner process
This allowed authentication via the legitimate Trusted Publisher binding for TanStack/router, without modifying the publish workflow itself. The attacker published credential-stealing malware directly to npm under a trusted identity.
Impact
Systems that installed any of the 84 malicious @tanstack/* package versions between May 11 and detection are compromised. The malware extracts credentials from the host environment - including cloud provider tokens, API keys, and CI/CD secrets - and exfiltrates them to the attacker’s infrastructure. Any workstation, build server, or production host that ran npm install on these versions should be treated as fully compromised.
CVSS 9.6 (CRITICAL) with an Attack Vector of NETWORK, Attack Complexity of LOW, and no privileges required. User interaction (installing the package) is required.
Remediation and Mitigation
- Immediately rotate all secrets exposed on any host that installed the malicious packages. This includes cloud provider access keys, GitHub tokens, npm tokens, database credentials, and TLS private keys.
- Audit npm install logs for any @tanstack/* package version installed between 19:20 and 19:26 UTC on May 11, 2026. The two malicious versions per package are identifiable by their timestamps.
- Rebuild all systems that ran affected package versions from a clean base, as the malware may have established persistence mechanisms.
- Pin all @tanstack/ dependencies* to known-good versions and enable npm audit signatures.
CISA KEV inclusion confirms active exploitation - treat this as a zero-trust boundary event.
Security Insight
This attack demonstrates that OIDC-based tokenless authentication alone does not prevent supply-chain compromise; the trust chain is only as strong as the CI/CD pipeline’s weakest authorization check. The pull_request_target misconfiguration is a recurring vulnerability class - a similar technique was used in the GlassWorm attack. Organizations should audit all GitHub Actions workflows for pull_request_target triggers and treat any CI/CD pipeline that can publish artifacts as a critical security boundary requiring strict workflow review and secret-scope isolation.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| Yomisana/are-you-get-tanstack-attack Are you get Tanstack Supply chain attack attack of 5/11? CVE-2026-45321 / GHSA-g7cv-rxg3-hmpx | ★ 0 |
Showing 1 of 1 known references. Source: nomi-sec/PoC-in-GitHub.
Related Advisories
Nx Console is the user interface for Nx & Lerna. On 19 May 2026, a malicious version of Nx Console, 18.95.0, was published at 12:30 PM UTC and removed soon after at 12:48 PM UTC, leaving it available ...
A supply chain attack compromised the official installation packages of DAEMON Tools Lite (Windows versions 12.5.0.2421 through 12.5.0.2434), distributed from the legitimate website daemon-tools.cc be...
Smart Slider 3 Pro version 3.5.1.35 for WordPress and Joomla contains a multi-stage remote access toolkit injected through a compromised update system that allows unauthenticated attackers to execute ...
Sherlock hunts down social media accounts by username across social networks. Prior to 0.16.1, the GitHub Actions workflow validate_modified_targets.yml is vulnerable to command injection via the pull...