In mid-September 2025 a self-replicating worm called Shai-Hulud spread through more than 500 npm packages. When installed, it ran TruffleHog over the machine to find secrets, published them to a public GitHub repository named Shai-Hulud, and used any npm token it found to inject itself into the victim's other packages. Anyone who installed an affected version should rotate npm, GitHub and cloud credentials on that machine or CI runner.
| Disclosed | September 15, 2025 |
|---|---|
| Earliest known activity | September 14, 2025 |
| Affected | npm, @ctrl/tinycolor, GitHub |
| Type | Supply chain |
| Status | Contained |
What was exposed
Whatever secrets TruffleHog could find on the filesystem and in environment variables of the machine that ran npm install: npm tokens, GitHub personal access tokens and, according to CISA, API keys for AWS, Google Cloud and Microsoft Azure. Stolen values were sent to a webhook.site endpoint and written to a public GitHub repository named Shai-Hulud in the victim's account, so anyone could read them until the repository was removed. The worm also pushed a workflow named shai-hulud-workflow.yml to the victim's repositories to exfiltrate their GitHub Actions secrets. With a stolen npm token it published infected versions of every package that token could publish.
Am I affected?
You are affected if a developer machine or CI runner installed any compromised version during the outbreak, directly or as a nested dependency. CISA recommends treating versions published on or after 16 September 2025 as suspect until checked, and pinning to releases from before that date. Look for a public repository named Shai-Hulud in your GitHub account, a branch named shai-hulud, or a file .github/workflows/shai-hulud-workflow.yml in any repository you can push to. If you maintain npm packages, check whether versions you did not publish appeared on your packages.
What to do now
- Search
package-lock.json,yarn.lockandpnpm-lock.yamlacross your projects, and your artifact caches, for the compromised versions published by StepSecurity, Socket and GitHub, and remove them. - Rotate every credential on affected machines and runners, starting with npm tokens, GitHub personal access tokens and cloud keys (AWS, Google Cloud, Azure).
- Delete any
Shai-Huludrepository,shai-huludbranch andshai-hulud-workflow.ymlworkflow, then rotate the GitHub Actions secrets of every repository where the workflow ran. - If you publish npm packages, check your packages for versions you did not release, unpublish or deprecate them, and switch to trusted publishing or short-lived granular tokens.
- Turn on phishing-resistant MFA for GitHub and npm, remove unused GitHub Apps and OAuth apps, and block outbound traffic to
webhook.sitefrom build systems.
Keys to rotate
Guides to the credentials this incident put at risk:
- Rotate npm keys
- Rotate GitHub keys
- Rotate AWS (IAM access keys) keys
- Rotate Google Cloud (service account keys and API keys) keys
- Rotate Azure (Microsoft Entra app client secrets) keys
Timeline
- GitHub says it was notified of the attack on this date. Source
- StepSecurity reports that
@ctrl/tinycolor4.1.1 and 4.1.2 and more than 40 other packages carry abundle.jspayload that runs TruffleHog and plants a GitHub Actions workflow. Source - GitHub says it removed more than 500 compromised packages, blocked uploads containing the worm's indicators, and announces plans to deprecate classic npm tokens and TOTP 2FA and to move publishing to short-lived tokens and trusted publishing. Source
- CISA publishes an alert and advises rotating all developer credentials. Source
Indicators
From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.
@ctrl/tinycolorversions 4.1.1 and 4.1.2.- A minified payload file
bundle.jsadded to the package and run from apostinstallscript. - A public GitHub repository named
Shai-Hulud, a branchshai-hulud, and.github/workflows/shai-hulud-workflow.yml. - Outbound connections to
webhook.site.
What this changes for credential handling
- The worm spread because install scripts could read long-lived publish tokens from disk. BotPassword keeps registry tokens out of plain files and injects them only into the command that needs them.
Frequently asked questions
Am I affected by the npm incident?
You are affected if a developer machine or CI runner installed any compromised version during the outbreak, directly or as a nested dependency. CISA recommends treating versions published on or after 16 September 2025 as suspect until checked, and pinning to releases from before that date. Look for a public repository named Shai-Hulud in your GitHub account, a branch named shai-hulud, or a file .github/workflows/shai-hulud-workflow.yml in any repository you can push to. If you maintain npm packages, check whether versions you did not publish appeared on your packages.
What was exposed in the npm incident?
Whatever secrets TruffleHog could find on the filesystem and in environment variables of the machine that ran npm install: npm tokens, GitHub personal access tokens and, according to CISA, API keys for AWS, Google Cloud and Microsoft Azure. Stolen values were sent to a webhook.site endpoint and written to a public GitHub repository named Shai-Hulud in the victim's account, so anyone could read them until the repository was removed. The worm also pushed a workflow named shai-hulud-workflow.yml to the victim's repositories to exfiltrate their GitHub Actions secrets. With a stolen npm token it published infected versions of every package that token could publish.
Which keys should I rotate?
Rotate any npm, GitHub, AWS (IAM access keys), Google Cloud (service account keys and API keys), Azure (Microsoft Entra app client secrets) credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.
Other supply-chain compromises
- LiteLLM 1.107.0 on PyPI and Docker carried a credential stealer after a leaked master key 2026-10-21
- tensorlake 0.5.144 on npm shipped a Shai-Hulud variant with a wipe-on-revoke dead-man's switch 2026-10-08
- keyv, flat-cache and cache-manager npm releases carried a CI-secret stealer with a revocation trap 2026-08-04
- 32 @redhat-cloud-services npm packages compromised after a VS Code extension hijacked a GitHub account 2026-06-01
- 14 typosquatted OpenSearch and DevOps npm packages stole AWS, Vault, GitHub Actions and npm secrets 2026-05-28
- Nx Console 18.95.0 VS Code extension shipped a credential stealer after a TanStack infection 2026-05-18