On 11 May 2026 between about 19:20 and 19:26 UTC an attacker published 84 malicious versions of 42 @tanstack/* npm packages through TanStack's own GitHub Actions trusted-publisher identity, after poisoning the CI cache from a fork pull request. The install-time payload stole AWS, Google Cloud, Kubernetes, Vault, npm, GitHub and SSH credentials and republished other packages its victims maintained. Anyone who installed an affected version that day should treat the host as compromised and rotate those credentials. OpenAI said two employee devices were hit.
| Disclosed | May 11, 2026 |
|---|---|
| Earliest known activity | May 10, 2026 |
| Affected | TanStack, @tanstack/react-router, @tanstack/router-core, @tanstack/react-start, npm, GitHub Actions, OpenAI |
| Type | Supply chain |
| Status | Resolved |
| CVE | CVE-2026-45321 |
What was exposed
TanStack's postmortem says the payload, an obfuscated router_init.js of about 2.3 MB run from a prepare script, harvested AWS instance metadata and Secrets Manager values, Google Cloud metadata credentials, Kubernetes service-account tokens, Vault tokens, ~/.npmrc, GitHub tokens (from the environment, the gh CLI and .git-credentials) and SSH private keys. In CI it dumped the runner's memory to extract an OIDC token and used it to publish to npm. Data went out over the Session/Oxen file network rather than an attacker server. It also listed other npm packages the victim maintained and republished them with the same injection. TanStack says no npm token of its own was stolen; the publishes used its legitimate OIDC binding. In a post published in mid-May, OpenAI said two employee devices in its corporate environment were affected and the malware took limited credential material from a subset of internal repositories; it said it found no evidence that user data, production systems or customer passwords and API keys were affected. It rotated credentials, revoked sessions, rotated code-signing certificates held in the affected repositories, and asked macOS users to update its apps.
Am I affected?
You are affected if any machine or CI job installed one of the exact versions listed in GHSA-g7cv-rxg3-hmpx on 11 May 2026, directly or as a transitive dependency (each affected package received exactly two malicious versions; the advisory lists, for example, @tanstack/react-router 1.169.5 and @tanstack/router-core 1.169.5). TanStack's Query, Table, Form and other families were not listed. Check lockfiles against the advisory, and look for a router_init.js at a package root or an optionalDependencies entry named @tanstack/setup pointing at a GitHub commit.
What to do now
- Compare your lockfiles with the per-package versions in GHSA-g7cv-rxg3-hmpx and upgrade to the patched versions it lists.
- On any host that installed an affected version, rotate AWS, Google Cloud, Kubernetes, Vault, GitHub, npm and SSH credentials.
- If you maintain npm packages, check them for versions you did not publish.
- Block
filev2.getsession.organdseed1toseed3.getsession.orgfrom build systems. - Avoid
pull_request_targetworkflows that run fork code, and do not share caches across the fork and base trust boundary.
Keys to rotate
Guides to the credentials this incident put at risk:
- Rotate AWS (IAM access keys) keys
- Rotate Google Cloud (service account keys and API keys) keys
- Rotate GitHub keys
- Rotate npm keys
Timeline
- The attacker creates a renamed fork of TanStack/router and pushes a payload commit under a forged
claudeidentity, per TanStack's postmortem. Source - A fork pull request triggers a
pull_request_targetworkflow that saves a poisoned pnpm cache. At 19:15 UTC a release run restores it; malicious publishes land at 19:20 and 19:26 UTC. A StepSecurity researcher opens issue #7383 at 19:46 UTC, and deprecations and npm takedowns follow that evening. Source - GitHub publishes GHSA-g7cv-rxg3-hmpx (critical) and NVD records CVE-2026-45321, listing per-package affected and patched versions. Source
- Nx reports that a contributor machine infected by
@tanstack/zod-adapter@1.166.15led to a malicious Nx Console extension release. Source
Indicators
From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.
router_init.js(about 2.3 MB) at the package root;optionalDependenciesentry@tanstack/setuppointing togithub:tanstack/router#79ac49ee....- Exfiltration to
filev2.getsession.organdseed1.getsession.org,seed2.getsession.org,seed3.getsession.org; second stage fromlitter.catbox.moe. - Commits authored as
claude <claude@users.noreply.github.com>; attacker accountszblggandvoicproducoes.
What this changes for credential handling
- A poisoned CI cache let the attacker publish under a trusted identity with valid provenance. BotPassword keeps publish rights behind an explicit approval rather than any workflow that can mint a token.
Frequently asked questions
Am I affected by the TanStack incident?
You are affected if any machine or CI job installed one of the exact versions listed in GHSA-g7cv-rxg3-hmpx on 11 May 2026, directly or as a transitive dependency (each affected package received exactly two malicious versions; the advisory lists, for example, @tanstack/react-router 1.169.5 and @tanstack/router-core 1.169.5). TanStack's Query, Table, Form and other families were not listed. Check lockfiles against the advisory, and look for a router_init.js at a package root or an optionalDependencies entry named @tanstack/setup pointing at a GitHub commit.
What was exposed in the TanStack incident?
TanStack's postmortem says the payload, an obfuscated router_init.js of about 2.3 MB run from a prepare script, harvested AWS instance metadata and Secrets Manager values, Google Cloud metadata credentials, Kubernetes service-account tokens, Vault tokens, ~/.npmrc, GitHub tokens (from the environment, the gh CLI and .git-credentials) and SSH private keys. In CI it dumped the runner's memory to extract an OIDC token and used it to publish to npm. Data went out over the Session/Oxen file network rather than an attacker server. It also listed other npm packages the victim maintained and republished them with the same injection. TanStack says no npm token of its own was stolen; the publishes used its legitimate OIDC binding. In a post published in mid-May, OpenAI said two employee devices in its corporate environment were affected and the malware took limited credential material from a subset of internal repositories; it said it found no evidence that user data, production systems or customer passwords and API keys were affected. It rotated credentials, revoked sessions, rotated code-signing certificates held in the affected repositories, and asked macOS users to update its apps.
Which keys should I rotate?
Rotate any AWS (IAM access keys), Google Cloud (service account keys and API keys), GitHub, npm credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.
Other supply-chain compromises
- LiteLLM 1.107.0 on PyPI and Docker carried a credential stealer after a leaked master key 2026-10-21
- tensorlake 0.5.144 on npm shipped a Shai-Hulud variant with a wipe-on-revoke dead-man's switch 2026-10-08
- keyv, flat-cache and cache-manager npm releases carried a CI-secret stealer with a revocation trap 2026-08-04
- 32 @redhat-cloud-services npm packages compromised after a VS Code extension hijacked a GitHub account 2026-06-01
- 14 typosquatted OpenSearch and DevOps npm packages stole AWS, Vault, GitHub Actions and npm secrets 2026-05-28
- Nx Console 18.95.0 VS Code extension shipped a credential stealer after a TanStack infection 2026-05-18