JavaScript packages with billions of downloads were injected with malicious code in world's largest supply chain hack, geared to steal crypto — a phishing email is all it took to undermine npm packages

shutterstock_2210295717
(Image credit: Shutterstock)

A total of 18 JavaScript packages that have over 2 billion weekly downloads have been injected with malicious code in what is billed as the largest supply chain hack in history. The compromised code was designed to steal cryptocurrency.

Picture this: Thanos, a Death-obsessed maniac retconned within the Marvel Cinematic Universe to be the most radical environmental activist in history, has assembled the Infinity Gauntlet. With it, he could wipe out half the universe's population. He raises his hand, snaps his fingers, and... steals a bunch of cryptocurrency instead. The Infinity Gauntlet would still be a problem, sure, but wouldn't that first snap come as a relief?

That's kind of how the recent compromise of JavaScript packages that have been downloaded billions of times feels. Does the ease with which an unknown threat actor was able to compromise the maintainer of these packages, modify the software, and distribute it highlight the disastrous state of modern software development? Absolutely. But we're lucky—they prioritized getting rich over wreaking havoc.

This isn't a new problem, nor is it exclusive to npm. I reported in 2021 that hackers were targeting maintainers of packages used by JavaScript, Python, Ruby, and Java developers in their own software, and even then, the problem had been known for years. The infamous left-pad incident—wherein the deletion of 11 lines of code "broke the internet" because so much software depended on it—happened in 2016.

Follow Tom's Hardware on Google News, or add us as a preferred source, to get our up-to-date news, analysis, and reviews in your feeds. Make sure to click the Follow button!

TOPICS
Nathaniel Mott
Freelance News & Features Writer

Nathaniel Mott is a freelance news and features writer for Tom's Hardware US, covering breaking news, security, and the silliest aspects of the tech industry.

  • nookoool
    At least it is good news it wasn't the maintainers doing the attack. People publish so many "useful" libraries that get adopted by tutorials and developers that it seem it would be possible for maintainers to go rogue. Got to be honest, how many people actually audit the thousands of libraries out there?
    Reply
  • 93QSD5
    Reason #3858247 to avoid NPM.

    I will NEVER install any piece software that requires NPM. NEVER.
    Reply
  • m3city
    The title of this news is long. Why not include the whole story in title? Or take journalism course
    Reply