SHA1-Hulud Supply Chain Attack Affecting npm Packages
A supply chain campaign dubbed "Shai Hulud 2.0" and "Sha1 Hulud: The Second Coming" affecting hundreds of npm packages
Summary
A supply chain campaign dubbed "Shai Hulud 2.0" and "Sha1 Hulud: The Second Coming" affecting hundreds of npm packages
Affected platforms
The following platforms are known to be affected:
Over 800 npm packages have been reported as infected thus far, though this number is expected to grow. Researchers at Socket have been maintaining an updated list of affected packages - https://socket.dev/blog/shai-hulud-strikes-again-v2.
Threat details
Introduction
Attackers have compromised legitimate npm maintainer accounts and injected a "worm" - malicious code that can self-replicate and spread across multiple machines or networks - into pre-install scripts in their controlled npm packages.
Exploitation activity details
When one of the trojanised npm packages is downloaded and installed, the malicious script runs automatically and deploys a payload that serves multiple purposes:
- Allows remote code execution via GitHub Actions
- Automatic exfiltration of GitHub and npm secrets
- Exfiltration of cloud credentials (Azure, AWS, GCP) to allow for broader compromise
- Propagation to victim-controlled GitHub and npm repositories to allow further downstream infections
If Sha1-Hulud is unable to steal GitHub or npm credentials, obtain tokens, or secure any exfiltration channel, it defaults to major data destruction on affected devices by deleting all files in the home directory of affected Linux devices and %USERPROFILE% on Windows.
Remediation advice
The NHS England National CSOC recommends impacted developers follow the remediation steps detailed below.
Remediation steps
Definitive source of threat updates
- https://www.koi.ai/incident/live-updates-sha1-hulud-the-second-coming-hundred-npm-packages-compromised
- https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains
- https://socket.dev/blog/shai-hulud-strikes-again-v2
- https://blog.gitguardian.com/shai-hulud-2/
- https://openjsf.org/blog/publishing-securely-on-npm
Last edited: 26 November 2025 4:27 pm