rotateit

All incidents

Shai-Hulud, a self-replicating npm worm that stole developer credentials

Disclosed Sep 15, 2025 · updated Oct 28, 2026 · critical · Historical

An npm worm stole GitHub, npm and cloud keys.

Are you affected?

The free scanner that answers this opens soon. Until then, the steps below work by hand.

What happened

A self-replicating npm worm stole developer credentials. CISA says the worm, Shai-Hulud, compromised over 500 npm packages: it scanned the environment for credentials, sent them to an attacker-controlled endpoint, uploaded them to a public GitHub repository named Shai-Hulud, and spread by authenticating to npm as the compromised developer and publishing infected versions of their other packages. Socket reported the malicious @ctrl/tinycolor 4.1.1 and 4.1.2 on 2025-09-15; its bundle.js ran TruffleHog over the file system and read GITHUB_TOKEN, NPM_TOKEN, AWS keys and the AWS and GCP instance-metadata endpoints. GitHub says it was notified on 2025-09-14 and removed more than 500 compromised packages.

Exposure starts
Not known yet (no source gives the first malicious publish; GitHub was notified on 2025-09-14)
Exposure ends
Not known yet (no source says when the last compromised version was removed)
Confidence
low
Scope
every credential readable on a developer machine or CI runner that installed a compromised version, and every package its npm identity could publish

What to do, in this order

  1. Remove compromised versions, clear cached copies and pin to releases before 2025-09-16

    CISA's first steps; a cached compromised version reinstalls the worm and steals the new tokens.

  2. npm tokens

    The worm spread by publishing as the compromised developer; Socket says it checked the stolen npm token against the registry before use.

    npm_token

  3. GitHub tokens, then audit for a public Shai-Hulud repository, new workflows and webhooks

    CISA and Unit 42 name GitHub personal access tokens; the worm added a GitHub Actions workflow and published stolen data to a public repository.

    github_pat, github_oauth_token, github_fine_grained_pat

  4. AWS, GCP and Azure credentials, then SSH keys and every other secret on the host

    CISA names AWS, GCP and Azure keys; Unit 42 says to rotate all developer credentials, including SSH keys and third-party API keys.

    aws_access_key_id, aws_secret_access_key, private_key, anything else stored there

  5. Require phishing-resistant MFA on GitHub and npm accounts

    CISA's recommendation, so a stolen password alone cannot publish.

Notes

  • CISA advises pinning npm dependencies to releases published before 2025-09-16 and checking package-lock.json and yarn.lock, including nested dependencies, and cached artifacts.
  • The full list of more than 500 compromised packages is TODO; only @ctrl/tinycolor is listed here, so rotateit's installed-package check covers that package alone.

How to tell if you’re affected

  • @ctrl/tinycolor 4.1.1 or 4.1.2 in a lockfile or node_modules
  • A public GitHub repository named Shai-Hulud under your account
  • A workflow file .github/workflows/shai-hulud-workflow.yml in a repository
  • Outbound connections to the webhook.site service from a build

Sources

Rotating the keys

Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.

One email when it opens. Stored: your email, whether you confirmed, and when you signed up. We send a confirmation link first.

By hand, free: the steps above.