Industry
Technology and SaaS
Hijacked build tools, poisoned packages, stolen developer logins and leaked keys at software companies, and the rules that apply.
Quick links
Press Enter to search, Esc to close
Significant cyber incident
In mid-September 2025, a self-copying worm called Shai-Hulud spread through the npm package registry, the main store for JavaScript code.
In short
In mid-September 2025, a self-copying worm called Shai-Hulud spread through the npm package registry, the main store for JavaScript code. It took over maintainer accounts, added malicious install scripts to their packages, and stole GitHub, npm and cloud credentials, which were then used to publish more infected packages. GitHub removed more than 500 packages, and CISA warned of a second, more destructive wave in November 2025.
GitHub said it was notified of the Shai-Hulud attack on 14 September 2025. The worm entered npm through compromised maintainer accounts and added malicious post-install scripts to popular JavaScript packages. CISA published an alert on 23 September 2025 and said more than 500 packages were compromised.
The malware searched for credentials, including GitHub tokens and cloud keys. It sent them to an endpoint the actor controlled and also placed them in a public GitHub repository named Shai-Hulud. It then used stolen npm access to publish more infected package versions. GitHub removed more than 500 packages and blocked new uploads that carried the malware’s known indicators.
On 25 November 2025 the New Zealand NCSC reported an evolved version of the worm that compromised almost 500 packages. GitHub later called this second wave Shai-Hulud 2.0.
GitHub says it was notified of the Shai-Hulud attack.
CISA later advises pinning npm dependencies to releases from before this date (14 September is when GitHub says it was notified).
GitHub publishes its plan for a more secure npm supply chain and says it removed 500+ compromised packages.
CISA publishes its alert and says the worm compromised over 500 packages.
New Zealand NCSC publishes an alert on the first wave. GitHub publishes the first phase of its npm security changes.
New write-enabled granular tokens get a seven day default and 90 day maximum lifetime, according to GitHub's 29 September notice.
New npm classic tokens can no longer be created. New write tokens enforce 2FA by default.
Date GitHub gave for the end of existing classic tokens.
New Zealand NCSC reports an evolved version of the worm compromising almost 500 packages.
GitHub says all npm classic tokens are permanently revoked and npm login now gives two-hour session tokens.
GitHub publishes a post describing the multi-wave campaign and its next npm security steps.
GitHub said the worm entered npm through compromised maintainer accounts. After initial access, CISA said the malware scanned the environment for credentials. It targeted GitHub personal access tokens and API keys for AWS, GCP and Azure. The sources opened do not say how the first accounts were compromised.
CISA said the malware sent the credentials to an actor-controlled endpoint and uploaded them to a public repository named Shai-Hulud. It then logged in to npm as the compromised developer, injected code into other packages and published the infected versions. GitHub said the code was a malicious post-install script, so it ran when someone installed the package.
GitHub also warned that an attacker can keep stolen tokens and start a new campaign weeks or months later.
GitHub said Shai-Hulud 2.0 added credential exposure across victims, command and control through self-hosted runner registration, destructive functions and a focus on CI environments. It used a multi-stage payload and changed package version numbers so infected releases looked like normal updates.
The New Zealand NCSC said this variant installed the Bun runtime with setup_bun.js, ran bun_environment.js, and used a randomly named repository for stolen data. If it could not authenticate to GitHub or find an npm token, it wiped files in the user’s home directory.
No source opened for this page maps the incident to MITRE ATT&CK technique ids, so none are listed.
No public attribution for the September 2025 first wave or the November 2025 second wave in the government and GitHub sources opened for this page. CISA calls the actor a "malicious cyber actor" and does not name a group.
Attributed by CERT-EU, 2 June 2026: its May 2026 brief names TeamPCP as the actor behind a supply-chain attack dubbed Shai-Hulud in May 2026 (over 160 npm and PyPI packages). That brief does not tie TeamPCP to the 2025 waves, so treat it as a later and separate claim.
CISA said the first wave compromised over 500 packages. GitHub said it removed 500+ compromised packages. The New Zealand NCSC said the second wave compromised almost 500 packages. No opened source gives a count of downstream victims, stolen credentials or financial loss.
GitHub said the worm could have enabled an endless stream of attacks without timely action. The New Zealand NCSC said the second wave could wipe the home directory of an affected user in some conditions.
The worm used a maintainer's own npm access to publish into other packages, so one account fed the next.
The malicious code ran as a post-install script, so installing a package was enough to run it.
GitHub moved to short-lived tokens, 2FA by default and revoked classic tokens after the incident.
GitHub warned attackers can hold tokens and attack weeks or months afterwards, so rotation matters after any scare.
GitHub said the second wave changed tactics and had a harder-to-detect payload, so fixing only the last variant is not enough.
CISA and GitHub both recommend them for developer accounts and for publishing.
Check package-lock.json and yarn.lock, including nested dependencies, against the published lists of compromised packages.
CISA advised pinning to releases from before 16 September 2025.
Rotate GitHub, npm, cloud and CI/CD credentials if a bad package was installed anywhere.
Look for unexpected repositories, such as one named Shai-Hulud or a random name, and unexpected branches.
Consider disabling npm postinstall scripts in CI where possible and freeze updates during an incident.
Check that GitHub and npm accounts use it and that tokens have an expiry date.
Block webhook.site and review firewall logs for suspicious domains, as CISA advised.
A self-replicating worm in the npm registry. CISA said it compromised over 500 packages.
It stole credentials, logged in to npm as the compromised developer, injected code into other packages and published infected versions.
CISA said GitHub personal access tokens and API keys for AWS, GCP and Azure.
Yes. The New Zealand NCSC reported an evolved version on 25 November 2025, and GitHub called it Shai-Hulud 2.0.
It stopped new classic tokens, revoked existing ones, capped token lifetimes, enforced 2FA on new write tokens and added two-hour login sessions.
No public attribution in the 2025 sources opened. CERT-EU named TeamPCP in a 2026 brief about a later attack with the same name, not the 2025 waves.
Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.