What happened
Replaying the Shai-Hulud 2.0 November 2025 intrusion
- 1
Maintainer publishes
Nov 18–24, 2025A pull request makes a CI workflow hand over a bot token; the bot token then rewrites a workflow that hands over an npm publishing token, and trojanized versions are published with maintainer credentials.
- 2
Install-time theft
From Nov 24, 2025On install, the preinstall script runs on a developer machine or CI runner, collects tokens and cloud credentials and attempts to dump cloud secrets managers.
- 3
Exfiltration and spread
From Nov 24, 2025The stolen data goes to public GitHub repositories, and the worm republishes up to 100 of the victim's own packages with the npm token it finds.
- 4
Stolen keys in use
Nov 25–26, 2025Leaked AWS long-term keys and GitHub tokens are used, and one victim's GitHub organization is cloned and force-pushed.
Hundreds of npm packages were trojanized (492 per Aikido, about 700 to nearly 800 per Wiz, over 800 per Kaspersky), and stolen secrets went to over 25,000 public GitHub repositories; Wiz's sample held about 775 GitHub tokens and 373 AWS, 300 GCP and 115 Azure credentials, and from Nov 26, 2025 Wiz saw leaked AWS long-term keys and GitHub tokens abused. One victim had 199 branches force-pushed and restored within about 7 hours. No source reports a cloud account taken over or a wiper running.
Where cloud-provider controls fit
The worm needed no cloud weakness: it ran as the installing user and read what that user could read. Cloud controls could remove long-lived keys from the host and bound what a stolen session reached, but the publish, the install script and the GitHub tokens belong to npm and GitHub. You can close or cap those steps with their own settings. Wiz saw stolen keys used from November 26, and no source reports a cloud account taken over.
Could this have been prevented?
In hindsight, not as a whole. 3 controls would have refused a step outright, and 24 controls would have limited one. 8 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.
- 3
- Prevented
- 24
- Contained
- 8
- 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 Shai-Hulud 2.0 November 2025 intrusion
1 · Maintainer publishes
5 Contained2 Not covered2 · Install-time theft
1 Prevented12 Contained2 Not covered3 on other clouds3 · Exfiltration and spread
1 Prevented2 Contained2 Not covered4 · Stolen keys in use
1 Prevented5 Contained2 Not covered1 on other cloudsKey facts
- Aikido detected the first compromised packages at 03:16:26 UTC on November 24, 2025 and counted 492 packages, with about 132 million monthly downloads
- Package counts differed by source: 492 (Aikido), about 700 to nearly 800 (Wiz) and over 800 (Kaspersky); Wiz counted over 25,000 exfiltration repositories
- PostHog's npm publishing token was taken through a pull_request_target workflow on November 23, 2025, and its malicious versions went live at 04:11 UTC on November 24
- In a sample of about 20,000 repositories Wiz found 775 GitHub tokens and 373 AWS, 300 GCP and 115 Azure credentials, all approximate
- In one victim's GitHub organization, 199 branches across 16 repositories were force-pushed in about 10 minutes on November 25, 2025 and restored within about 7 hours
- From 16:00 UTC on November 26, 2025 Wiz saw leaked AWS long-term keys and GitHub tokens used; no count or account is given
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.Shai-Hulud 2.0 Supply Chain Attack: 25K+ Repos Exposing SecretsWiz Research · Nov 24, 2025 · Researchtimeline, malware behavior, exfiltration, cloud credential theft, sampled secrets, abuse of leaked keys, backdoor, counts, mitigations
- 2.Shai Hulud Launches Second Supply-Chain Attack: Zapier, ENS, AsyncAPI, PostHog, Postman CompromisedAikido Security · Nov 24, 2025 · Researchdetection timeline, package counts, named namespaces, staging script, exfiltration repository description
- 3.Post-mortem of Shai-Hulud attack on November 24th, 2025PostHog · Nov 26, 2025 · Vendor reportinitial access chain, timeline, affected packages, remediation
- 4.How we got hit by Shai-Hulud: A complete post-mortemTrigger.dev · Nov 25, 2025 · Vendor reportdeveloper machine infection, GitHub org activity, AWS access, containment, changes made
- 5.Navigating the Shai-Hulud Worm 2.0: Elastic's updated response to npm supply chain compromiseElastic · Dec 1, 2025 · Vendor reportCI pipeline incident, containment, mitigations, propagation scope
- 6.Shai Hulud 2.0, now with a wiper flavorKaspersky Securelist · Dec 3, 2025 · Researchinstall-time execution, npm token propagation, wiper trigger, cloud credential theft, telemetry counts
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.