On 8 September 2025, a developer called Josh Junon opened an email that looked like it came from npm, the registry where JavaScript developers publish and download code. It said his account would be locked unless he updated his two-factor authentication within two days. The link went to npmjs.help, a domain registered three days earlier.
He entered his details. Soon afterwards, new versions of packages he maintains, including chalk and debug, had been published with malicious code inside. According to Check Point's write-up, the 18-plus packages affected had over 2 billion weekly downloads between them.
Nobody hacked a bank or a government. They hacked one person, and through him, a huge slice of the world's software. That's a software supply chain attack, and 2025 was the year it stopped being a niche concern.
What a software supply chain attack actually is
Almost no modern software is written from scratch. A typical web application pulls in hundreds of open-source packages: small, free building blocks for things like formatting dates, colouring terminal output or talking to a database. Those packages pull in their own packages, and so on. Your app ends up trusting code written by thousands of people you've never heard of.
A supply chain attack poisons one of those building blocks, so that everyone who installs it gets the poison too. The attacker doesn't need to break into your systems. You invite the code in yourself, during a routine install or update.
How the September 2025 npm compromise worked
- 01
Phish
A fake 'npm support' email sends the maintainer to a lookalike login page.
- 02
Take over
With his credentials and 2FA code, the attackers control his npm account.
- 03
Publish
Malicious versions of trusted packages go up on the official registry.
- 04
Spread
Developers and build systems around the world install the update automatically.
- 05
Steal
In browsers, the code quietly swaps cryptocurrency wallet addresses for the attackers' own.
Then came the worm
A week later, something worse appeared. A self-spreading piece of malware, nicknamed Shai-Hulud, started moving through npm on its own. The US Cybersecurity and Infrastructure Security Agency issued an alert on 23 September 2025 saying it had compromised over 500 packages.
Here's what made it different. When a developer installed an infected package, the worm searched their machine for secrets: GitHub access tokens and keys for AWS, Google Cloud and Microsoft Azure. It sent them to the attackers. Then it used the developer's own npm access to inject itself into their packages and publish new infected versions. Every victim became a new carrier.
In late November 2025 a second wave arrived. Check Point's analysis of Shai-Hulud 2.0 counted:
621
npm packages infected in the November wave
Check Point, 2025
25,000
GitHub repositories compromised
Check Point, 2025
14,206
secrets leaked, of which 2,485 were still valid
Check Point, 2025
The second version ran its code during the install step itself, before any of the package was even used, and carried a destructive fallback that could wipe files if it detected it was being analysed.

This isn't a one-off
The headline incidents sit on top of a much larger, quieter problem: packages published as malware from day one, with names designed to be mistaken for popular ones. Sonatype, which tracks open-source malware, reports a steep climb:
Known malicious open-source packages, cumulative
npm is the biggest target because it's the biggest registry, not because it's uniquely careless. Python's PyPI and other ecosystems see the same tactics at a smaller scale.
You don't have to be the target. You just have to install the same package as everyone else.
Why this matters to a business that isn't a tech company
If you've had a website, app or internal system built in the last few years, it almost certainly depends on npm packages, even if nobody on your team has ever heard of them. The risks are concrete:
- Your customers' data or money. The September payload targeted cryptocurrency transactions in the browser; a different payload could just as easily skim form data.
- Your cloud bill and accounts. Stolen cloud keys can be used to run up huge bills, or to get into your hosting and databases.
- Your reputation. If your site serves malicious code to visitors, it's your name on it, whoever wrote the package.
It's the same lesson as the WordPress plugin problem and the React2Shell vulnerability: the code you didn't write is part of your attack surface.
How to protect your projects
CISA's guidance after Shai-Hulud is a good backbone. This is how we'd put it into practice, in order:
- 1
Know what you're running
Make sure every project has a lock file (package-lock.json or yarn.lock) committed, so the exact version of every package, including nested ones, is recorded and reviewable.
- 2
Don't take updates blindly
Pin dependencies to known-good versions and update deliberately, reviewing what changed. Some teams now wait a few days before adopting a brand-new release, because most malicious versions are caught quickly.
- 3
Lock down developer accounts
Require phishing-resistant multi-factor authentication (passkeys or security keys) on GitHub, npm and cloud accounts. A code sent by text or app can be phished; a hardware key bound to the real site can't.
- 4
Keep secrets off developer machines
Use short-lived tokens and a proper secrets manager. The fewer long-lived keys sitting in files and environment variables, the less a worm can steal.
- 5
Turn on automated alerts
GitHub's Dependabot alerts and secret scanning, or an equivalent tool, warn you when a package you use is flagged or a key is exposed.
- 6
Have a plan for 'it happened'
Know how you'd find which projects use an affected package, and how you'd rotate every credential quickly. CISA's first advice after Shai-Hulud was to rotate all developer credentials immediately.
If you're not sure what your website or app depends on, or who's watching for these alerts, that's worth finding out before the next incident rather than during it. Our ransomware survival guide covers the wider basics of keeping a small business safe.
Force Media builds and maintains web applications for businesses in Sri Lanka, Australia and beyond, with dependency monitoring, lock-file hygiene and secure deployment built in. Ask us to review your project's dependencies, and we'll tell you what you're trusting and whether you should be.



