The Reliable Power Behind Web3 Organizations

Lemma's Blog

Supply Chain Attack Hit npm Packages: What This Means for Transaction Signers

September 11, 2025

Security researchers recently uncovered a serious breach in the npm ecosystem, which is the world’s largest hub for open-source JavaScript code. Attackers managed to publish malicious versions of widely used software packages, including Chalk, a package downloaded billions of times each month. These malware updates were not inserted directly into finished applications but into the building blocks that developers rely on. As a result, countless applications, including those in the crypto space, may have unknowingly pulled in compromised code.

A package is a small bundle of code that solves a specific problem. Instead of writing everything from scratch, developers pull packages off the shelf. For example, one package might handle colors in a terminal, another might connect to a blockchain API.

A package manager like npm (Node Package Manager) is the delivery system. It lets developers install and update packages, and it automatically handles dependencies between packages. This convenience also creates a single point of failure. If attackers compromise a package on npm, that malicious code can spread downstream quickly.

A DeFi application or browser wallet does not write all its code in-house. It relies on dozens, sometimes hundreds, of npm packages for functions like encryption, interface elements, or API calls. If even one of those dependencies has been tampered with, the malicious code can slip inside the application during development. The app is then compiled and shipped with the attacker’s code hidden inside, ready to run on user machines.

The incident reported this week followed that exact pattern. Attackers gained control of maintainer accounts and published new package versions that looked legitimate but carried hidden malware. In some cases, the malicious updates did not match the code stored on GitHub, which was the first red flag.

The injected code could run automatically after installation. Because these packages are downloaded at an enormous scale, some billions of times per week. Even a brief compromise can reach thousands of applications indirectly. Researchers found that the malware attempted to steal secrets or redirect crypto transactions.

In the context of supply chain attacks hardware wallets are safeguards because they keep private keys off the computer and restrict signing to a dedicated device. This means that even if a compromised package slips into an application, the malware cannot directly extract or use the keys.

However, they are not fool proof. Hardware wallets rely on users to interpret the information shown on the hardware wallet screen. In many cases, the data displayed can be difficult to interpret in terms of confirming wallet addresses or especially in complex smart contract interaction. This creates a different type of risk: users may approve a transaction without fully understanding where they are confirming.

The npm incident demonstrates how fragile trust in shared developer infrastructure has become. By compromising one popular package, attackers can spread malware into wallet software, DeFi applications, or governance tools without touching the breaching team directly. For the crypto industry, this is a reminder that centralization of risk always comes in different forms from an industry wide perspective.

Introduction In the Web3 space, multi-signature wallets (or ‘multisig wallets’) like SAFE have become indispensable tools

September 6, 2024

Introduction Grant programs, when done right, are a great way to fund initiatives that help developers

August 26, 2024

Introduction Grants programs have become a common practice in the Web3 ecosystem. They serve various purposes

July 4, 2024

Contact Us

Every great Web3 project needs a trusted backbone. Start the conversation today.