What happened
Replaying the TanStack May 2026 compromise
- 1
Fork code runs in the base repository
May 10 17:May 16 – 11 11:31 UTCA pull request from an attacker's fork runs in the pull_request_target bundle-size workflow, and a 1.1 GB poisoned pnpm cache entry is saved under the main-branch scope at 11:29 UTC.
- 2
The release pipeline publishes the malware
May 11 19:15 – 19:26 UTCTwo release runs restore the poisoned cache, the job's OIDC token is read from runner memory, and 84 malicious versions of 42 packages are published through npm trusted publishing.
- 3
Install-time credential harvest
May 11, 2026, after 19:20 UTCA prepare script runs on every install of an affected version, targets cloud, Kubernetes, Vault, npm, GitHub and SSH credentials and uploads to the Session/Oxen network; the project does not confirm that any credential was stolen from a victim.
- 4
Spread and downstream breaches
May 11 – 21, 2026; the downstream access dates are not statedThe worm republishes its victims' other packages; Grafana Labs loses its repositories through a missed workflow token, and a news report links GitHub's internal repository access to the wave through an Nx Console developer.
84 malicious versions of 42 @tanstack packages (CVE-2026-45321, critical, CVSS 9.6) were published on May 11, 2026 and stayed on npm until it removed the tarballs between 22:13 and 23:55 UTC; their install-time payload targets cloud, Kubernetes, Vault, npm, GitHub and SSH credentials, and the project does not confirm that any credential was stolen from a victim, while no source reports a victim cloud compromise. Downstream, Grafana Labs reported that its codebase was downloaded but not altered, with no impact on customer production systems, and GitHub reported access to its internal repositories.
Where cloud-provider controls fit
The pull_request_target trigger, the shared Actions cache, the runner's job token and the right to publish to npm sit with GitHub and npm, so no cloud control reaches the first two phases; GitHub job-level permissions would have bound the OIDC token to the job that publishes. Once the package ran on your hosts, npm's ignore-scripts setting tells npm to run no package script on an install, though the sources do not say which package manager each victim used, network conditions in AWS and Google Cloud refuse a stolen credential used from outside your network, bound Kubernetes tokens cap a copied token, and DNS filtering in AWS and egress rules in Google Cloud refuse the upload by name from the hosts behind them. The project does not confirm that any credential was stolen from a victim, and the downstream repository breaches stay with source control.
Could this have been prevented?
In hindsight, no control would have stopped it. 15 controls would have limited how far it went. 10 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.
- 0
- Prevented
- 15
- Contained
- 10
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
Replaying the TanStack May 2026 compromise
1 · Fork code runs in the base repository
2 Not covered2 · The release pipeline publishes the malware
1 Contained2 Not covered3 · Install-time credential harvest
12 Contained3 Not covered6 on other clouds4 · Spread and downstream breaches
2 Contained3 Not coveredKey facts
- A fork was created on May 10, 2026 at 17:16 UTC; a pull request from it, opened on May 11 at about 10:49 UTC, ran in a pull_request_target workflow, and at 11:29 a 1.1 GB poisoned pnpm cache entry was saved to the main-branch scope
- At 19:15:44 and 19:16:22 UTC two release workflow runs restored the poisoned cache and the job's OIDC token was read from the runner's memory; the project says no npm token was stolen and the publish workflow was not itself changed
- Between 19:20:39 and 19:26:14 UTC 84 malicious versions of 42 @tanstack packages were published through the legitimate OIDC trusted-publisher binding, and both runs ended with a failure status
- The payload ran from a prepare lifecycle script on install, sent data to the Session/Oxen network, which the project says has no attacker-controlled command-and-control server, and targets AWS, Google Cloud, Kubernetes, Vault, npm, GitHub and SSH credentials; the project does not confirm that any credential was stolen from a victim
- A StepSecurity researcher opened a tracking issue at 19:46:46 UTC, about 26 minutes after the first publish; the first deprecation came about 59 minutes after it, all 84 versions were deprecated by 21:03 and npm removed the tarballs between 22:13 and 23:55
- Grafana Labs traced its repository breach to the wave, where a missed workflow token let attackers download its codebase, and one news report links GitHub's internal repository access to the wave through an Nx Console developer; GitHub's own page does not mention TanStack
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.Postmortem: TanStack npm supply-chain compromiseTanStack · May 11, 2026 · Vendor reportAttack chain, timeline, scope counts, malware behavior, detection, response, all-clear, open questions
- 2.Hardening TanStack After the npm CompromiseTanStack · May 12, 2026 · Vendor reportHardening steps, controls that did not stop the attack, platform gaps named by the project
- 3.Malware in 42 @tanstack/* packages exfiltrates cloud credentials, GitHub tokens, and SSH keysGitHub Security Advisories (TanStack/router) · May 11, 2026 · AdvisoryScope counts, affected versions, severity, mitigations
- 4.Mini Shai-Hulud Is Back: npm Worm Hits over 160 Packages, including Mistral and TanstackAikido Security · May 12, 2026 · ResearchWave scope, payload credential targets, propagation
- 5.Cache-poisoning caper turns TanStack npm packages toxicThe Register · May 12, 2026 · NewsDetection, advisory time, hedged cloud-credential claim
- 6.Grafana Labs security update: Latest on TanStack npm supply chain ransomware incidentGrafana Labs · May 19, 2026 · Vendor reportDownstream repository breach, missed token, scope of access, no production impact
- 7.Investigation update: GitHub Enterprise Server signing key rotationGitHub · May 20, 2026 · Vendor reportGitHub internal repository access, malicious editor extension, containment
- 8.GitHub, Grafana Labs breaches traced back to TanStack supply chain compromiseHelp Net Security · May 21, 2026 · NewsDownstream chain to Nx Console and GitHub, harvested credential classes, attribution as reported
The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.