On May 11, 2026, attackers published 84 malicious versions of 42 @tanstack packages in roughly six minutes. The affected code includes TanStack Router and TanStack Start, building blocks used in many modern websites and web apps. The malicious code spread the same day to 169 packages and stole cloud, Kubernetes, Vault, GitHub, npm and SSH secrets.
What is going on
npm is the shop where web developers get ready-made code packages. When a developer installs or updates a package, they trust that the version in the shop came from the real project team.
The attackers did not guess a password. They chained three weaknesses in the project's automated build system: a pull_request_target workflow, which runs project automation on code proposed by outsiders; poisoning of the GitHub Actions cache, the store of reusable build files; and theft of an OIDC token, a short-lived pass that lets the build publish to npm.
Because the packages were published by the project's own build system, they carried valid SLSA provenance. Provenance is a receipt saying where a package was built. Here the receipt was genuine, which is why nothing looked wrong at install time.
The stolen code then behaved like a worm. It used the secrets it found to publish more poisoned packages, reaching 169 packages that day.
Who is affected
Anyone who installed or updated TanStack Router or TanStack Start packages on May 11, 2026 may have run the malicious code. That includes sites built with these packages and the developer laptops or build servers that touched them.
Ordinary visitors to your site were not the target. The target was the credentials sitting on build machines: cloud, Kubernetes, Vault, GitHub, npm and SSH secrets.
What to do now
- Ask your developer or agency whether any @tanstack package was installed or updated on May 11, 2026, on any machine or build server.
- If the answer is yes or unclear, rotate every credential that machine could reach: cloud keys, Kubernetes, Vault, GitHub, npm tokens and SSH keys.
- Reinstall clean package versions from a known-good lockfile, and rebuild and redeploy the site from that clean state.
- Audit your own repositories for
pull_request_targetworkflows and for build caches shared with untrusted code; both were key steps in this attack. - Review recent logins and activity on your cloud, GitHub and npm accounts for anything you do not recognise.
How to check your own site
A supply-chain attack like this happens inside your build pipeline, so no external scan can confirm it on its own. What an outside view does show is the result: software versions you did not expect, missing security headers, weak TLS and email-authentication gaps. The free Website Security Check covers those in a few minutes, and for sites whose ownership you have verified you can run a full scan that adds active OWASP Top 10 testing, port and service checks with CVE matching, and exposed-file and secret checks.
Keep the window short
The practical lesson is speed. Poisoned packages were live for minutes, but stolen secrets stay useful until you rotate them. Treat credential rotation, not package removal, as the first job.
Source: TanStack npm supply chain compromise postmortem, May 2026.
Comments
No comments yet.