
NPM and State of the Supply Chain
The Hidden Web3 Supply Chain Threat: How NPM Packages Can Hijack Your Crypto Transactions Picture this: You’re browsing a friend’s coffee blog on a Tuesday morning, reading about the perfect pour-over technique. Later, you open a new tab to swap $10,000 worth of ETH for USDC on Uniswap. You connect your MetaMask wallet, carefully review the transaction details, and click confirm. Everything looks normal. The transaction goes through successfully. Except your $10,000 just went to a hacker’s wallet instead of completing your intended trade. The coffee blog had nothing to do with cryptocurrency. It didn’t ask you to connect your wallet. It didn’t even have any Web3 functionality. Yet somehow, visiting that innocent website enabled an attacker to hijack your transaction on a completely different site, in a different browser tab, minutes or even hours later. This isn’t science fiction. This is the reality of a new class of supply chain attacks targeting the Web3 ecosystem. On September 8, 2025, this exact scenario became possible for millions of users when attackers compromised 18 of the most popular JavaScript packages on NPM—packages with a combined 2.6 billion weekly downloads. These weren’t obscure, suspicious packages. They were fundamental building blocks of the web: chalk (used for terminal colors), debug (used for logging), and ansi-styles (used for text formatting). Packages so common that they’re embedded in virtually every JavaScript project, from simple blogs to complex DeFi platforms. The attack was devastatingly simple: a single phishing email convinced a package maintainer to enter their credentials on a fake NPM website. Within hours, malicious code was injected into packages used by millions of websites worldwide, creating a global attack surface that could reach into users’ crypto wallets regardless of which site they were visiting. What makes this attack particularly insidious is that it exploits the intersection of two critical technologies: supply chain dependencies and browser wallet extensions. Modern web development relies on thousands of third-party packages, creating an enormous trust network where a single compromised dependency can affect millions of users. Meanwhile, Web3’s vision of universal wallet access means that browser extensions like MetaMask inject powerful financial APIs into every website you visit—including that innocent coffee blog. The result is a perfect storm: any website with compromised dependencies can potentially steal cryptocurrency from any user with a browser wallet extension, even if the website has nothing to do with crypto. Remarkably, despite affecting packages with billions of weekly downloads, the September attack only netted attackers around $600. This wasn’t due to superior security measures—it was largely due to rapid community detection, implementation mistakes by the attackers, and pure luck. The attack was discovered within minutes and mitigated within hours, but it revealed a vulnerability that could have been catastrophic under different circumstances. This near-miss should serve as a wake-up call for the entire Web3 ecosystem. We’re one successful attack away from a crisis that could undermine trust in decentralized finance, cost users millions in stolen funds, and set back Web3 adoption by years. The intersection of supply chain security and Web3 architecture has created an attack surface that most developers, users, and even security professionals don’t fully understand. The threat is real, it’s growing, and it’s largely invisible to the users most at risk. Understanding how these attacks work—and how to defend against them—is no longer optional for anyone building, investing in, or using Web3 technologies.