Supply chain · May 11, 2026

TanStack npm compromise: 84 versions of 42 @tanstack packages stole cloud, GitHub and SSH credentials

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.

DisclosedMay 11, 2026
Earliest known activityMay 10, 2026
AffectedTanStack, @tanstack/react-router, @tanstack/router-core, @tanstack/react-start, npm, GitHub Actions, OpenAI
TypeSupply chain
StatusResolved
CVECVE-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

  1. Compare your lockfiles with the per-package versions in GHSA-g7cv-rxg3-hmpx and upgrade to the patched versions it lists.
  2. On any host that installed an affected version, rotate AWS, Google Cloud, Kubernetes, Vault, GitHub, npm and SSH credentials.
  3. If you maintain npm packages, check them for versions you did not publish.
  4. Block filev2.getsession.org and seed1 to seed3.getsession.org from build systems.
  5. Avoid pull_request_target workflows 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:

Timeline

  1. The attacker creates a renamed fork of TanStack/router and pushes a payload commit under a forged claude identity, per TanStack's postmortem. Source
  2. A fork pull request triggers a pull_request_target workflow 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
  3. GitHub publishes GHSA-g7cv-rxg3-hmpx (critical) and NVD records CVE-2026-45321, listing per-package affected and patched versions. Source
  4. Nx reports that a contributor machine infected by @tanstack/zod-adapter@1.166.15 led 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; optionalDependencies entry @tanstack/setup pointing to github:tanstack/router#79ac49ee....
  • Exfiltration to filev2.getsession.org and seed1.getsession.org, seed2.getsession.org, seed3.getsession.org; second stage from litter.catbox.moe.
  • Commits authored as claude <claude@users.noreply.github.com>; attacker accounts zblgg and voicproducoes.

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.

Keep keys out of reach of the next compromised package

BotPassword is in early access. Request an invite and we'll email you when your spot opens.