ghtier

These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.

← All incidents

Shai-Hulud self-propagating npm worm

September 2025 / November 2025 / May 2026 · Contained

A self-spreading npm worm: each infected install stole the victim's GitHub and npm tokens, pushed a workflow that sent their repositories' secrets out, and published infected versions of the victim's own packages.

Access held
T0repoT1workflowT1Runner registration token or JIT configurationT3Contents: Readnpm publish tokennpm tokensCloud keys and secretsRepository Actions secrets
Scale
May 2026 wave: more than 630 malicious versions across 317 npm packages in about 20 minutes
Full summary

A worm that turned each victim into the publisher of the next round. Malicious versions of popular npm packages, published with stolen maintainer npm tokens, ran a payload at install time on developer machines and CI runners. It ran TruffleHog over the disk, read cloud keys from metadata services, took the GitHub token from the environment or the gh CLI and wrote everything it found to a new public repository in the victim's own GitHub account. With the same token it pushed a workflow to every repository the victim could reach that sent that repository's Actions secrets out, and copied private organization repositories into public ones. Any npm token it found was used to publish infected versions of that maintainer's other packages, and so the worm spread. The first wave started on 15 September 2025. Shai-Hulud 2.0, from 21 November 2025, ran before install, also registered the infected machine as a self-hosted runner named SHA1HULUD with a workflow that let anyone run commands on it by opening a discussion, and wiped the home directory when it found no token to spread with. Datadog counted 796 packages and more than 500 GitHub users across 150 organizations; Wiz found more than 25,000 exfiltration repositories. A smaller descendant, Mini Shai-Hulud, which Wiz attributes to TeamPCP, came back in 2026: on 19 May one stolen npm token published 637 malicious versions of 317 packages, including the AntV libraries, in under half an hour. Its TanStack wave a week earlier came in through Actions cache poisoning (see the cache poisoning incident).

How it unfolded

Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.

Whole path

Leaked tokenway innpm publish tokenA maintainer's tokenPublish a malicious versionwith a stolen tokentechniqueCompromised Action orpackageway inrepoVictim's GitHub tokenworkflowThe same tokennpm tokensVictim's .npmrcCloud keys and secretsDisk, cloud metadataChange a workflow, get itssecretsescalationRepository Actions secretsEach repo's workflowsClone private repos with astolen tokentechniqueContents: ReadVictims' org reposPost stolen data to a newpublic repositorytechniqueFlip private repositoriesto publicescalationRead or expose private codePublish a malicious versionwith a stolen tokentechniquePoison the build orpublished packageRegister a self-hostedrunnerescalationRunner registration token orJIT configurationVictim's repositoryLeaked tokenway innpm publish tokenatool's npm tokenPublish a malicious versionwith a stolen tokentechniquePoison the build orpublished package

The whole attack, one row per step. Pick a step on the left, or click a box in its row.

Frameworks

Part of

Contained. First seen September 2025, last seen May 2026. May 2026 wave: more than 630 malicious versions across 317 npm packages in about 20 minutes (as of 19 May 2026, source). Mapping by ghtier, not yet reviewed. Threat landscape

Sources