Shai-Hulud npm worm turned victims into malicious-package publishers

Text
iHOLYSHITVISUAL / TECHSecurity incidentsiHOLYSHIT / ILLUSTRATION
iHolyShit illustration

The first Shai-Hulud wave in September 2025 linked credential theft with automated malicious releases. GitHub removed more than 500 compromised packages.

Installing a familiar software package could make a developer an unwitting distributor of the next malicious update. That was the disturbing mechanism of the first Shai-Hulud campaign in npm in September 2025. In its September 22 response, GitHub said it had removed more than 500 compromised packages. The attack blurred the boundary between a victim and a distributor.

npm is a shared parts catalogue for JavaScript development. Applications can use existing components instead of having every function written from scratch. Some components arrive indirectly through other dependencies. A familiar project name therefore does not guarantee that every subsequent release remains under trustworthy control.

StepSecurity described a feedback loop: malicious installation code searched a developer environment for publishing credentials, then used available authority to insert itself into other packages that the maintainer could publish. New releases carried the infection onward. Think of a parts supplier receiving contaminated stock, losing its warehouse keys, and having additional shelves restocked by the intruder. The recipient becomes another distribution point rather than merely a destination for stolen data.

Socket identified another inversion. The malware used TruffleHog, an open-source tool normally used to discover exposed secrets. The tool itself had not become malicious. Its operator had repurposed the same discovery capability to locate material worth stealing. This was not a claim that the worm could crack every password: it targeted credentials accessible in the affected environment.

The harm extended beyond publishing. Wiz initially observed eight users whose private repositories had been copied and made public, alongside credentials exposed in public repositories. That was an investigative snapshot, not a final count of all victims. Removing a malicious package cannot make information already disclosed to others secret again.

Package poisoning and abused installation scripts were not inventions of this campaign. CERT/CC pointed to earlier incidents using those building blocks. Wiz characterized Shai-Hulud as npm’s first successful self-propagating attack. The meaningful change was the completed cycle: steal publishing authority, contaminate legitimate packages, reach another environment and repeat. It was more than a new disguise on a phishing message.

Recovery consequently involved more than uninstalling one dependency. CERT/CC advised revoking and replacing potentially exposed credentials, limiting publishing permissions, and separating build environments so untrusted code could not access publishing credentials. These controls address different links in the chain. None of this implies that every npm user was infected.

The enduring question is concrete: does the place where outside software gets installed also hold the keys for publishing software to others? Reading somebody else’s code and releasing your own are distinct responsibilities. When both share authority, an ordinary dependency update can cross a boundary that was supposed to belong to the maintainer.

Public analysis of the first wave began on September 15, 2025.

Share this article

What do you think of this story?

Anonymous feedback, up to 5 reactions per article.

Anonymous comments

Share your thoughts without signing in.

Discuss the technology and the story. Hate, politics and war, threats, abuse, personal accusations, sexual content, ads, links and personal information are not allowed.

0/500

No comments yet. Be the first to share.

Sources

Shai-Hulud npm worm turned victims into malicious-package publishers|iHolyShit