Self-replicating "Shai-Hulud" worm compromises more than 500 npm packages by stealing developer tokens (2025)
CISA reported that a self-replicating worm known as "Shai-Hulud" had compromised more than 500 npm packages.
What happened
- The malware scanned environments for credentials such as GitHub personal access tokens and AWS, Google Cloud and Azure API keys, sent them to the actor and also uploaded them to public GitHub repositories.Widespread Supply Chain Compromise Impacting npm Ecosystem
- It spread by authenticating to npm as the compromised developer, injecting code into that developer's other packages and publishing new versions; CISA advised rotating all developer credentials and requiring phishing-resistant MFA.Widespread Supply Chain Compromise Impacting npm Ecosystem
The failure pattern
Watch the pattern: Weak or phishable authentication on a privileged path
Safeguards that address it
CollectSEA's engineering analysis of what would have prevented or contained this failure.
- Keep publishing credentials out of developer environmentsUse short-lived, scoped publishing tokens or trusted publishing, so malware on a laptop or CI runner cannot republish packages.
- Pin and review dependency updatesInstall from a lockfile, delay adopting brand-new package versions and block install scripts where possible.
Related standards
CollectSEA's mapping through this incident's failure pattern; not an official determination by the standards bodies.
Building something similar?
Describe your design and see every precedent that applies, with safeguards you can hand to your coding agent.
Incidents with the same pattern
Stolen OAuth tokens from the Salesloft Drift integration are used to export data from customers' Salesforce instances (2025)
From as early as August 8 to at least August 18, 2025, an actor tracked as UNC6395 used compromised OAuth tokens of the Salesloft Drift third-party application to access customers' Salesforce instances.
Malicious code committed to the Amazon Q Developer VS Code extension via a compromised token (AWS, 2025)
Malicious code was committed to the extension's open-source repository using a compromised GitHub token in a build configuration.
Call and text records of nearly all AT&T wireless customers taken from a third-party cloud workspace (2024)
Contractor credentials without MFA accessed third-party cloud data warehouse; downloaded 109 million customer call and text records.
Stolen credentials on a remote-access portal lead to the Change Healthcare ransomware outage (2024)
Single-factor remote access portal breached with stolen credentials; ransomware forced nationwide claims gateway disconnection.
Password spray on a legacy test tenant exposes Microsoft corporate email to a nation-state actor (2024)
Legacy test tenant without MFA compromised via password spraying; adversary created malicious OAuth apps with mail.read privileges.
Stolen credential opens Okta's support system, where uploaded HAR files held customer session tokens (2023)
Support portal allowed unredacted HAR file uploads containing session tokens; threat actor hijacked customer administrator accounts.