Table of Contents
Shai-Hulud was a self-replicating malware campaign that spread through compromised npm maintainer accounts in September 2025. Malicious package install scripts stole credentials and used publishing access to infect additional packages. Removing a dependency alone does not undo credential theft if its malicious code has already run.
What happened in September 2025
Early reporting focused on @ctrl/tinycolor; the campaign later reached other maintainers, including packages published through the crowdstrike-publisher account. Counts changed as investigators identified more affected releases, so an early total of 300 should not be treated as a final inventory.
GitHub's September 22 incident account describes malicious post-install scripts and the removal of compromised packages. Socket's technical investigation provides package indicators and details of the credential theft.
How the worm spread
The malicious code searched development and CI environments for usable credentials, including npm publishing tokens, GitHub tokens and cloud-service keys. Investigators observed use of TruffleHog, a legitimate secret-scanning tool, to locate credentials. TruffleHog itself was not the compromised npm dependency.
With stolen publishing access, the worm could download another package's archive, modify package.json, add its payload, repack the archive and publish a malicious version. This turned affected maintainer environments into another route for distribution.
Check versions, not just package names
Packages named in reports included @ctrl/tinycolor, ngx-toastr, @crowdstrike/glide-core, angulartics2, eslint-config-crowdstrike and @nativescript-community/ui-collectionview. A package appearing in an incident report does not mean every version is malicious.
Compare the exact resolved versions in lockfiles, dependency inventories, build logs, caches and internal mirrors with the incident indicators. Include transitive dependencies and installations in developer machines and CI runners. Use an advisory for the relevant campaign and date; this short list is not a complete or current blocklist.
If a malicious version may have run
- Contain the affected environment. Stop builds and publishing from it, and preserve relevant logs and lockfiles for investigation.
- Revoke exposed credentials from a clean device. Review npm, GitHub and cloud access available to the affected process, including credentials in environment variables and configuration files. Issue replacements only into a trusted environment.
- Inspect account activity. Look for unauthorized package releases, repository changes, workflows and access changes. Coordinate with your security team and service providers.
- Replace affected dependencies. Select versions explicitly verified against the advisory and rebuild in a clean environment. Do not assume the newest version or a simple reinstall is safe.
- Check downstream artifacts. Determine whether compromised builds or packages were distributed, then follow your incident-response process.
Uninstalling a package or pinning a version does not revoke stolen tokens, remove unauthorized workflows or establish that a host is clean. Treat dependency cleanup and credential containment as separate parts of the response.
Reader Comments 0
Sign in with email or Google to join the discussion.