A Dependabot bump published a worm. 22 packages.
A bot opens a pull request.
A bot opens a pull request. A human merges it 24 minutes later. 95 minutes after that, a worm has published 110 malicious versions of his 22 npm packages, under his name, with a token it found in his CI.
Read the written edition (English) ↗
What this video covers
- A bot, a human, a worm
- How it happened, why npm allowed it, who gets the blame
- Timeline: the poisoned cache
- 21:48 — the Dependabot bump
- Why it works
Questions and answers
How did attackers publish malicious TanStack npm packages with valid provenance?
They poisoned a build cache that the release workflow later trusted. According to the TanStack postmortem, a renamed fork opened a pull request whose benchmark workflow saved a poisoned cache. A legitimate merge then ran the release, and a binary read the runner's memory, took the publish token and shipped eighty-four malicious versions across forty-two packages.
How can a Dependabot update lead to a worm publishing packages under a maintainer's name?
A routine dependency bump can pull in a poisoned package whose install script runs in CI. At 21:48 UTC Dependabot opened a pull request in a small downstream project, bumping thirteen updates, two of them poisoned TanStack versions. The maintainer merged it at 22:12, and the worm soon published using the token it found.
Why does npm let a worm like this spread through dependencies?
The episode points to three weaknesses. Install runs lifecycle scripts by default, including a prepare script on a git dependency. Tokens that bypass two-factor authentication exist, and the worm used one to republish everything the maintainer owned. Deprecated versions also stay installable, because npm refuses to unpublish anything that has dependents.
How many packages were affected by the Mini Shai-Hulud worm?
The episode counts forty-two TanStack packages in the upstream compromise and 22 downstream packages from a project with nine stars, where the worm published 110 versions in 95 minutes. It says more than 160 packages were affected across the ecosystem once the worm reached Mistral, citing Aikido.
What should maintainers change after the TanStack supply chain attack?
The Daily Diff's verdict was SHIP IT for the maintainers' response. Both maintainers published timestamped postmortems within a day, and the downstream pipeline installed with ignore-scripts, separated build from publish and dropped the long-lived token. The episode's advice is to use ignore-scripts on install and keep the publish token out of the job that installs dependencies.
Transcript
A bot, a human, a worm
0:00 A bot opens a pull request; a human merges it twenty-four minutes later. Ninety-five minutes on, a worm has published a hundred and ten versions of his packages, as him. TanStack's postmortem has the upstream timestamps, the downstream maintainer's has the rest, and Hacker News gives it eleven hundred points and a name: Mini Shai-Hulud. How it happens, why npm allows it, who gets the blame.
How it happened, why npm allowed it, who gets the blame
0:21 This is The Daily Diff, postmortem. May 11th, morning. A renamed fork opens a pull request against TanStack Router. It closes within the hour, but a benchmark workflow has already run its code and
Timeline: the poisoned cache
0:33 saved a poisoned cache under the key the release workflow will use. Nineteen-twenty. A legitimate merge runs the release. The cache comes back, a binary reads the runner's memory, lifts the publish token, and ships eighty-four versions across forty-two packages, with valid provenance. Tests fail. It publishes anyway. Nineteen forty-six, a StepSecurity researcher files the issue; by nine UTC everything is deprecated and the advisory is out.
0:55 Deprecated is not gone: npm refuses to unpublish anything with dependents, so it stays installable for hours. Twenty-one forty-eight. In a nine-star aviation-data project, Dependabot opens its routine pull request: bump the dev-dependencies group, thirteen updates. Two are poisoned TanStack versions. Twenty-two-twelve: merged. The publish workflow runs npm C-I with the token in
21:48 — the Dependabot bump
1:15 scope; a prepare script reads it, and at twenty-two-seventeen the worm publishes as him. Five versions of every package the token reaches, even an old side project: one classic token for everything. A hundred and ten versions in ninety-five minutes. He finds out by email, after midnight. Why it works. One: npm install runs strangers' lifecycle scripts by default, and a git dependency's prepare script counts.
1:39 Two: the worm wants one thing: a token that publishes without a second factor. Then it asks the registry what else that maintainer owns, and republishes all of it with itself inside. Three: nothing in the chain is a person.
Why it works
1:51 A bot proposes, a pipeline installs, and the worm returns the favour: its dead-drop branches are named dependabot slash github-actions slash fremen. git blame. npm's install model, fifty-five percent: scripts run on install, deprecated stays installable, two-factor-bypass tokens exist. TanStack's CI, twenty-five: an unaudited pull request target workflow running fork code with write access to the cache. The bump habit, fifteen: thirteen updates merged in twenty-four minutes, token in the room.
2:17 Dependabot, five: so trusted the worm wears its uniform.
git blame
2:20 Blast radius: forty-two TanStack packages. Twenty-two downstream, from a project with nine stars. Over a hundred and sixty ecosystem-wide once the worm reaches Mistral. Every upstream version carried a valid signature: built by the official pipeline. True. Verdict, postmortem: SHIP IT. Both maintainers post timestamped postmortems within a day; within three, the downstream pipeline installs with ignore-scripts, splits build from publish, and drops the long-lived token.
Blast radius
2:47 npm's defaults haven't moved. Monday: ignore-scripts on install, and the publish token out of the job that runs it. Send me the incident you're still not allowed to talk about, in the comments, or at thedailydiff.dev. And that's the diff for today.
Verdict
3:00 I'm Niko from Axrisi. Merge responsibly.
Sources
- TanStack postmortem (Tanner Linsley, May 11, refined May 15)tanstack.com
- TanStack "Hardening TanStack After the npm Compromise" (May 12)tanstack.com
- TanStack/router#7383 — the StepSecurity detection issuegithub.com
- Downstream incident post, @squawk/* (May 12)github.com
- Downstream hardening post (May 14)github.com
- The Dependabot PR #246 (opened 21:48 UTC, merged 22:12)github.com
- @tan_stack advisory post, 21:19 UTCx.com
- StepSecurity — worm internals, bypass_2fa search, Dependabot-style branch nameswww.stepsecurity.io
- Socketsocket.dev
- Aikido — "over 160 packages, including Mistral"www.aikido.dev
- Hacker News (1,097 points)news.ycombinator.com



