TL;DR: Shai Hulud 2.0 is compromising the npm ecosystem by stealing API keys, cloud credentials, and npm or GitHub tokens, then self-replicating through malicious package updates and randomly named GitHub repositories, according to Cycode. The pattern shows that supply chain worming and secrets theft now reinforce each other, so detection without rapid secret revocation leaves organisations exposed.
Editorial analysis by NHI Mgmt Group, based on content published by Cycode: “Shai Hulud 2.0: The Second Coming of the Supply Chain Attack”.
By the numbers:
- Cycode reports 775 GitHub PATs, 373 AWS keys, 300 GCP keys, and 115 Azure keys were stolen.
- The campaign has affected more than 25,000 compromised GitHub repositories and 492 to 800 plus republished npm packages.
Key questions
Q: What breaks when a malicious npm package can read developer secrets during install?
A: The main failure is that package execution inherits identity context it should never need.
Q: Why do exposed machine secrets make supply chain attacks worse?
A: Because machine secrets are often reusable across package publishing, repository access, and cloud operations.
Q: What are the signs that secret theft is spreading through a developer environment?
A: Watch for unexpected package publication, new public repositories, unfamiliar GitHub Actions workflows, unusual token use, and secrets appearing in places that do not match normal developer activity.
Practitioner guidance
- Audit package installation trust paths Identify where post-install scripts can run with access to secrets, tokens, or repository credentials, then reduce those privileges during dependency installation.
- Rotate all exposed machine secrets Assume API keys, cloud credentials, npm automation tokens, GitHub PATs, and CI/CD credentials on developer endpoints or runners may already be compromised.
- Inspect repository and workflow creation activity Look for unknown GitHub Actions files, unexpected public repositories, and anomalous package publishing from accounts that normally do not create them.
Bottom line: Shai Hulud 2.0 shows that npm compromise becomes much more dangerous when stolen secrets can be reused to publish, exfiltrate, and spread.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Shai Hulud 2.0 is a secrets governance failure as much as a supply chain attack. The worm works because package trust, developer credentials, and CI/CD token scope are allowed to overlap. Once those three surfaces intersect, one malicious install can become both a leak event and a propagation event. The practitioner lesson is to govern package trust and secret lifecycle together, not as separate domains.
A few things that frame the scale:
- 80% of identity breaches involved compromised non-human identities such as service accounts and API keys, according to the Ultimate Guide to NHIs.
- Only 20% have formal processes for offboarding and revoking API keys, and even fewer have procedures for rotating them, according to the Ultimate Guide to NHIs.
A question worth separating out:
Q: Should organisations treat npm automation tokens as machine identities?
A: Yes. npm automation tokens function as machine identities because they authenticate systems, publish software, and can be used without a human in the loop. They should be inventoried, scoped narrowly, monitored continuously, and revoked on task completion or suspected compromise, just like any other privileged non-human credential.
👉 Read our full editorial: Shai Hulud 2.0 exposes how npm worm attacks amplify secret risk