Sep 9, 2025

NPM Supply Chain Attack That Shook Devs (But Barely Paid Hackers’ Bills)

If you’ve been anywhere near developer Twitter (sorry, X) this week, you’ve probably seen the headlines: “Largest NPM supply chain hack in history.” Sounds apocalyptic, right? Millions of developers at risk, billions of downloads compromised… and yet the attackers managed to steal less money than your average Starbucks order. The irony isn’t lost on security professionals: a breach with enormous potential impact yielded minimal financial gain but exposed vulnerabilities that could have been catastrophic in other hands.

Let’s break this down.

Largest hack in history and it started with an email. How’s your team’s inbox hygiene?

What Happened in the NPM Supply Chain Attack

How one of the npm hacks that shook the world happened

Over the weekend, attackers compromised 18 massively popular JavaScript packages—including chalk, debug, and ansi-styles. If you’ve ever touched Node.js, you’ve almost certainly used them. In total, these libraries are pulled 2.6 billion times a week.

The attacker didn’t brute force their way in or find some zero-day in NPM. Nope. They did what attackers always do: sent a phishing email. Much like the sophisticated phishing techniques detailed in this red team operation, attackers know that human vulnerability often trumps technical defenses. The maintainer got a message that looked like it was from NPM security (“Update your 2FA now or your account will be locked!”). One click later, the attackers had credentials, 2FA codes, and the keys to the kingdom.

What makes this npm cyberattack particularly concerning is its rapid propagation. Within hours after the malicious code was published, thousands of projects automatically pulled the compromised versions through their build pipelines, demonstrating how quickly trust-based ecosystems can become weaponized.

The malware they slipped in wasn’t ransomware or spyware—it was a wallet skimmer. Anytime someone used a compromised package, the code could silently redirect Web3 crypto transactions to the attacker’s wallet.

Big plan. Huge scope. Billions of downloads. Total loot? Somewhere between $50 and $500 in stolen crypto.

Why the JavaScript Malware Campaign Worked

Three main reasons explain how this turned from a phishing email into the “largest npm hack in history” headlines:

  1. Supply chains are fragile. One person’s account = billions of downstream risks. It’s the weakest-link problem, but at an internet scale. The decentralized nature of open-source maintenance means that critical infrastructure often depends on individual developers who may lack enterprise-grade security resources.
  2. Phishing is timeless. We can invent all the AI threat detection we want, but a well-crafted fake email still works. Ask any SOC analyst.
  3. Crypto = easy money. It’s quick, untraceable (mostly), and tempting. Though, in this case, apparently not all that profitable.

Watch: Explainer Video on the NPM Hack

If you want a quick visual breakdown of how this all unfolded, this short video does a great job of summing it up:

How to Protect Against NPM Supply Chain Attacks

How to defend against npm hack

Here’s the part that matters most: what you do next. Even if your project wasn’t directly hit this time, supply chain attacks are only getting more common. Organizations that invest in robust security measures, like those recognized in G2’s Spring 2025 report, understand that proactive defense is crucial.

  • Stop trusting sketchy emails. “npmjs.help”? Really? Always check the sender’s domain.
  • Use hardware keys for 2FA. They can’t be phished like SMS or app codes.
  • Lock down publishing rights. Only trusted maintainers should be able to push new package versions. Consider implementing mandatory code review processes even for trusted maintainers, as credentials can be compromised without their knowledge.
  • Scan your dependencies. A tool like Semgrep or GitHub’s alerts can save you from bad updates.
  • Pin versions. Don’t blindly auto-update packages. Latest doesn’t always mean safest.

The npm supply chain attack 2025 proves that automated dependency updates, while convenient, can introduce malicious code before security teams have time to respond.

Phishing works. Unfortunately. Wanna test how your team would fare?

Why This Supply Chain Hack Still Matters (Even if the Hackers Barely Profited)

This attack shows how one compromised maintainer can ripple through the entire internet in minutes. Imagine if the payload wasn’t a wallet skimmer but something destructive. The dollar loss here is almost comically low, but the risk exposure was astronomical.

In other words, the hackers failed to cash in big, but the lesson is priceless. Supply chain security isn’t a nice-to-have—it’s survival. Strategic partnerships, like the collaboration between Boulay and UnderDefense, highlight how organizations are joining forces to strengthen their security posture against such threats.

Bottom line: Don’t wait until the next “npm hacked” to realize your dependencies are your biggest vulnerability. Secure them now, while your attackers are still bumbling around with $50 in stolen crypto.

1. What is the NPM supply chain hack?

In September 2025, attackers compromised 18 popular NPM packages, inserting malicious code that hijacked Web3 crypto transactions. These packages are downloaded billions of times per week, making it one of the largest open-source supply chain attacks ever.

2. What are the common types of supply chain attacks?

Common types of supply chain attacks include compromised software updates or libraries, third-party provider breaches, hardware tampering, and watering-hole attacks. All of these exploit trusted partners or components to slip into a target’s network.

3. How can supply chain attacks be prevented?

They can be prevented by keeping full visibility over your software and vendors, enforcing strong security controls, and securing build/update pipelines. Tools like EDR, code integrity policies, and a solid incident response plan help catch issues early.

4. How do you detect a supply chain attack?

Supply chain attacks are typically spotted through monitoring tools that alert on unusual activity across devices, applications, and internal systems.

5. Who is most at risk of supply chain attacks?

Organizations that depend heavily on third-party tools or vendors, such as e-commerce businesses, SaaS companies, and financial institutions, are among the most exposed.

6. Why are supply chain attacks dangerous?

Because the potential impact is massive. A single compromised dependency can affect thousands of projects instantly. This time it was small-scale theft. Next time, it could be data destruction, backdoors, or large-scale fraud.

7. How did the attackers compromise the JavaScript packages?

They phished a maintainer with a fake NPM security email. Once they stole login credentials and 2FA tokens, they published malicious versions of popular packages.

Alina Shyika

Alina Shyika

Product Marketing Manager at UnderDefense

Alina Shyika is a Product Marketing Manager at UnderDefense, focused on helping security and business leaders navigate the complexity of modern cyber defense with greater clarity and confidence.

Working at the intersection of cybersecurity, product, and strategy, Alina brings perspective to the questions that matter most to CISOs, IT directors, and security operations teams — what works in practice, where the real risks lie, and how to build security programs that keep pace with the business.

Grounded in close collaboration with security practitioners and ongoing dialogue with industry leaders, Alina's work reflects how threats, technologies, and defense strategies are evolving in the field today.
Topics covered include threat detection, SOC operations, and compliance — with a focus on practical guidance for the leaders shaping the next generation of security programs.

Ready to protect your company with Underdefense MDR?

Related Articles

See All Blog Posts