Fireship · @fireship
Shai-Hulud just prairie dogged the NPM registry...
Uploaded May 14, 2026 · Length 6:16
Summary
Shai-Hulud malware attack on npm registry, compromising 169 packages and spreading to PyPI.
- npm registry attack
- shai-hulud malware
- supply chain attack
- pnpm security
- npm security
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
Just a few days ago, the worst nightmare
- 0:02
of every open- source maintainer finally
- 0:04
came true. No, they weren't forced to
- 0:06
socialize with the opposite sex.
- 0:07
Instead, in just 6 minutes, which I've
- 0:09
been arguing for years is actually quite
- 0:11
a long time, over 100 packages that
- 0:14
collectively get downloaded more than 50
- 0:15
million times a week, were compromised
- 0:17
in a supply chain attack where no one
- 0:19
was fished, no passwords were leaked,
- 0:21
and no tokens were stolen. And to make
- 0:23
it even worse, the poisoned packages
- 0:25
were signed, verified, and shipped
- 0:27
through npm's trusted publishing
- 0:29
feature, which was built primarily to
- 0:31
prevent these kinds of attacks and has
- 0:33
been the recommended publishing setup
- 0:35
for almost 2 years now. In today's
- 0:37
video, we'll break down the clever trick
- 0:38
that let an attacker hijack the release
- 0:40
pipeline of one of the biggest projects
- 0:42
in the React ecosystem. We'll see how
- 0:44
the malware then spread to hundreds of
- 0:46
other packages and learn about the dead
- 0:48
man switch, which is now on every
- 0:50
infected machine that will nuke your
- 0:52
home folder the second you try to clean
- 0:54
it up. Heaven help us all. It is May
- 0:56
14th, 2026, and you're watching the code
- 0:58
report. Life has been extra exciting
- 1:00
lately because every time I wake up, I
- 1:02
wonder which one is going to destroy my
- 1:04
life first, the rodent poop cruise virus
- 1:06
or the mini shy hallude virus. But
- 1:08
thankfully, I'm no poop expert, so I'll
- 1:10
stick with breaking down how the shy
- 1:12
hallude prairie dogged its little head
- 1:14
again in a fairly sophisticated attack
- 1:16
that no one saw coming. And it all
- 1:18
started with how Tanstack's release
- 1:19
process works. Whenever a new pull
- 1:21
request is merged, a GitHub actions
- 1:23
workflow kicks off, which handles
- 1:25
publishing the new version to the mpm
- 1:27
registry. But to do that, the continuous
- 1:29
integration server needs to get a
- 1:31
publish token from npm first. To prove
- 1:34
the request is legit, GitHub itself
- 1:36
signs a statement saying which workflow
- 1:38
is running, in which repo, and on which
- 1:40
branch. NPM then checks that signed
- 1:42
statement against the org's allow list
- 1:44
and only hands over a token if
- 1:46
everything matches. The token then lives
- 1:48
for a few minutes in the CI's cache and
- 1:50
then quickly becomes stale, so there's
- 1:52
nothing for traditional fishing attacks
- 1:53
to steal. This sounds bulletproof, but
- 1:56
the problem is that the mini shy hulude
- 1:58
attack wasn't traditional. Here's how it


