Shai-Hulud 2.0 is a widespread and destructive supply-chain malware campaign that has compromised the JavaScript ecosystem through the npm registry. First detected between November 21–24, 2025, this second wave follows an earlier Shai-Hulud campaign and has rapidly escalated, affecting over 1,000 npm packages, 27,000+ GitHub repositories, and 100+ million downloads across prominent projects like Zapier, Postman, ENS Domains, AsyncAPI, and PostHog.
Severity: High
Threat Details
- Initial Vector: Trojanized NPM Packages
- Attackers used compromised developer accounts to publish malicious versions of popular npm packages.
- Each infected package includes a preinstall script executing setup_bun.js, which:
- Downloads and installs the Bun runtime.
- Launches the obfuscated payload in bun_environment.js (~10MB).
- Malware Capabilities
The final payload is a multi-stage worm with three primary functions:- Credential Harvesting: It downloads and executes TruffleHog to scan the local machine and steal sensitive data. Stolen information includes NPM Tokens, AWS/GCP/Azure cloud credentials, and environment variables.
- Data Exfiltration and Propagation:
- The worm steals the user’s secrets and uploads them to a public GitHub repository.
- The malware creates a new GitHub repository with a random name (unlike the previous version which used /shai-hulud) and sets the repository description to “Sha1-Hulud: The Second Coming”.
- It also deploys a GitHub Action runner named SHA1HULUD.
- The self-propagating worm repacks itself into up to 100 of the user’s available npm packages, compromising them further (an increase from 20 in the original attack).
- File Destruction (Wiper): If the malware fails to authenticate with GitHub or npm, it attempts to wipe files. On Linux/macOS systems, it uses the shred command to overwrite and delete writable user files in the home directory, while on Windows, it deletes all files in %USERPROFILE%.
Recommendations
- Immediately revoke and rotate all NPM tokens associated with the compromised developer accounts. This is the primary vector for propagation.
- Rotate any exposed AWS, GCP, or Azure cloud keys/secrets that may have been present in the developer’s environment variables or scanned by the malware (using tools like TruffleHog).
- Force-rotate all GitHub tokens and personal access tokens (PATs) associated with the compromised users.
- Delete any unauthorized GitHub Actions runners deployed by the malware (e.g., runners named SHA1HULUD).
- Check your repositories for package versions containing the malicious preinstall: node setup_bun.js script or the bun_environment.js file & revert to a clean, known-good commit.
- Configure your environment to block or limit the execution of scripts during package installation. Use the flag –ignore-scripts where possible, or use tools that can sandbox or analyze these scripts before execution.
- Use runtime analysis tools that check for known malware signatures or flag suspicious behaviors like installing third-party tools (like TruffleHog) or making network calls to unknown domains.
- Mandate MFA for all developer accounts on critical platforms like npm, GitHub, and cloud providers (AWS, GCP, Azure). This makes stolen tokens or passwords useless on their own.
Source:
- https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains
- https://helixguard.ai/blog/malicious-sha1hulud-2025-11-24
- https://research.jfrog.com/post/shai-hulud-the-second-coming/
- https://www.koi.ai/incident/live-updates-sha1-hulud-the-second-coming-hundred-npm-packages-compromised
- https://www.reversinglabs.com/blog/another-shai-hulud-npm-worm-is-spreading-heres-what-you-need-to-know
- https://safedep.io/shai-hulud-second-coming-supply-chain-attack/
- https://socket.dev/blog/shai-hulud-strikes-again-v2
- https://www.stepsecurity.io/blog/sha1-hulud-the-second-coming-zapier-ens-domains-and-other-prominent-npm-packages-compromised
- https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack
Enjoyed reading this Threat Intelligence Advisory? Stay updated with our latest exclusive content by following us on Twitter and LinkedIn
No related posts found.