Fireship · @fireship

Shai-Hulud just prairie dogged the NPM registry...

Uploaded May 14, 2026 · Length 6:16

Shai-Hulud just prairie dogged the NPM registry...

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.

  1. 0:00

    Just a few days ago, the worst nightmare

  2. 0:02

    of every open- source maintainer finally

  3. 0:04

    came true. No, they weren't forced to

  4. 0:06

    socialize with the opposite sex.

  5. 0:07

    Instead, in just 6 minutes, which I've

  6. 0:09

    been arguing for years is actually quite

  7. 0:11

    a long time, over 100 packages that

  8. 0:14

    collectively get downloaded more than 50

  9. 0:15

    million times a week, were compromised

  10. 0:17

    in a supply chain attack where no one

  11. 0:19

    was fished, no passwords were leaked,

  12. 0:21

    and no tokens were stolen. And to make

  13. 0:23

    it even worse, the poisoned packages

  14. 0:25

    were signed, verified, and shipped

  15. 0:27

    through npm's trusted publishing

  16. 0:29

    feature, which was built primarily to

  17. 0:31

    prevent these kinds of attacks and has

  18. 0:33

    been the recommended publishing setup

  19. 0:35

    for almost 2 years now. In today's

  20. 0:37

    video, we'll break down the clever trick

  21. 0:38

    that let an attacker hijack the release

  22. 0:40

    pipeline of one of the biggest projects

  23. 0:42

    in the React ecosystem. We'll see how

  24. 0:44

    the malware then spread to hundreds of

  25. 0:46

    other packages and learn about the dead

  26. 0:48

    man switch, which is now on every

  27. 0:50

    infected machine that will nuke your

  28. 0:52

    home folder the second you try to clean

  29. 0:54

    it up. Heaven help us all. It is May

  30. 0:56

    14th, 2026, and you're watching the code

  31. 0:58

    report. Life has been extra exciting

  32. 1:00

    lately because every time I wake up, I

  33. 1:02

    wonder which one is going to destroy my

  34. 1:04

    life first, the rodent poop cruise virus

  35. 1:06

    or the mini shy hallude virus. But

  36. 1:08

    thankfully, I'm no poop expert, so I'll

  37. 1:10

    stick with breaking down how the shy

  38. 1:12

    hallude prairie dogged its little head

  39. 1:14

    again in a fairly sophisticated attack

  40. 1:16

    that no one saw coming. And it all

  41. 1:18

    started with how Tanstack's release

  42. 1:19

    process works. Whenever a new pull

  43. 1:21

    request is merged, a GitHub actions

  44. 1:23

    workflow kicks off, which handles

  45. 1:25

    publishing the new version to the mpm

  46. 1:27

    registry. But to do that, the continuous

  47. 1:29

    integration server needs to get a

  48. 1:31

    publish token from npm first. To prove

  49. 1:34

    the request is legit, GitHub itself

  50. 1:36

    signs a statement saying which workflow

  51. 1:38

    is running, in which repo, and on which

  52. 1:40

    branch. NPM then checks that signed

  53. 1:42

    statement against the org's allow list

  54. 1:44

    and only hands over a token if

  55. 1:46

    everything matches. The token then lives

  56. 1:48

    for a few minutes in the CI's cache and

  57. 1:50

    then quickly becomes stale, so there's

  58. 1:52

    nothing for traditional fishing attacks

  59. 1:53

    to steal. This sounds bulletproof, but

  60. 1:56

    the problem is that the mini shy hulude

  61. 1:58

    attack wasn't traditional. Here's how it