Ledger CTO: Massive NPM Supply Chain Attack Hijacks Popular Packages to Steal Crypto

Massive npm supply chain attack compromises 2+ billion weekly downloads with crypto-stealing malware. Sophisticated 'crypto-clipper' targets Bitcoin, Ethereum & more through popular JavaScript packages. Developers urged to audit dependencies immediately

Ledger CTO: Massive NPM Supply Chain Attack Hijacks Popular Packages to Steal Crypto

A sophisticated supply chain attack has compromised dozens of widely-used npm packages with over 2 billion weekly downloads, deploying malicious "crypto-clipper" malware designed to steal cryptocurrency from developers and users worldwide. The attack, discovered on September 8, 2025, represents one of the most significant threats to the JavaScript ecosystem to date.

Attack Overview: Foundational Packages Compromised

The threat actors gained control of the npm account belonging to developer "qix" and published malicious versions of fundamental JavaScript utilities that serve as building blocks for countless projects. The compromised packages include error-ex (47+ million weekly downloads), chalk, debug (357+ million weekly downloads), strip-ansi, color-convert, and dozens of others that collectively see over 2.6 billion downloads per week.

What makes this attack particularly dangerous is that these aren't high-profile frameworks like React or Express. Instead, they're small utility packages buried deep in dependency trees that developers inherit without knowing they exist. The attack was discovered when a CI/CD pipeline failed with a "ReferenceError: fetch is not defined" error, leading investigators to uncover the malicious code hidden within what appeared to be routine package updates.

Sophisticated Crypto-Stealing Malware

The malicious payload is a highly sophisticated "crypto-clipper" that operates with surgical precision to steal cryptocurrency. The malware employs a two-pronged approach:

Browser Injection and Wallet Monitoring: The code injects itself into web browsers and monitors for cryptocurrency activity across multiple blockchain networks including Ethereum, Bitcoin, Solana, Tron, Litecoin, and Bitcoin Cash. It hooks into JavaScript functions like fetch, XMLHttpRequest, and wallet APIs (window.ethereum, Solana APIs) to intercept transactions before they're signed.

Intelligent Address Swapping: Perhaps most cleverly, the malware uses the Levenshtein distance algorithm to replace legitimate wallet addresses with attacker-controlled ones that are visually similar. This sophisticated technique makes the swap incredibly difficult for users to detect, exploiting human perception limitations to ensure fraudulent transactions go unnoticed.

When the malware detects wallet software like MetaMask, it patches the wallet's communication methods and intercepts transaction data before it reaches the wallet for signing. The code includes hardcoded lists of attacker-controlled Bitcoin and Ethereum addresses, strategically chosen to appear similar to legitimate addresses.

Broader Crypto Ecosystem Impact

The attack has far-reaching implications for the entire cryptocurrency ecosystem:

Exchange and Wallet Vulnerability: Cryptocurrency exchanges and wallet services that use affected npm packages in their web interfaces could have exposed users to the malware, regardless of which cryptocurrencies they support. The malware specifically targets major cryptocurrencies including Bitcoin, Ethereum, and Solana.

Developer Tool Compromise: Crypto developers building applications, payment interfaces, or blockchain integration tools using Node.js and npm dependencies may have unknowingly incorporated the malicious code into their projects, potentially compromising end-user transactions.

Industry Trust Concerns: Supply chain attacks like this highlight the broader security challenges facing cryptocurrency adoption, particularly for institutional users who require robust security guarantees before integrating digital assets into their operations.

Immediate Response and Mitigation

The npm team and package maintainers responded quickly once the attack was detected. The malicious package author initially claimed to be "aware of being compromised" and began cleaning up the affected packages. However, many malicious versions remained available for several hours, potentially exposing thousands of developers.

Security researchers recommend immediate action for all JavaScript projects:

Use npm ci in pipelines: Replace npm install with npm ci in CI/CD environments to prevent automatic updates that could pull in malicious versions.

Pin dependencies with overrides: Use package.json overrides to force specific, safe versions across entire projects, including transitive dependencies.

Audit existing projects: Run npm audit and manually check for any of the compromised packages in current dependency trees.

The attack method involved sophisticated phishing emails sent to npm package maintainers from "support@npmjs.help," impersonating official npm communications about mandatory 2FA updates. This social engineering component highlights how attackers are increasingly targeting the human element in software supply chains.

Market and Regulatory Implications

This attack underscores the critical security challenges facing the cryptocurrency industry as it seeks broader adoption. For regulators already scrutinizing crypto security practices, supply chain vulnerabilities represent a significant concern that could influence future regulatory frameworks.

The incident also highlights the interconnected nature of modern software development, where a single compromised account can potentially affect billions of downloads and countless end users. This has implications for how cryptocurrency companies approach third-party dependencies and security auditing processes.

For additional security tools and monitoring, developers can utilize services like Snyk, Socket Security, and Dependabot to continuously monitor dependencies for vulnerabilities.

Sources

  1. Staerk, J.D. (2025, September 8). "We Just Found Malicious Code in the Popular NPM Package." JD Staerk Newsletter. Retrieved from https://jdstaerk.substack.com/p/we-just-found-malicious-code-in-the
  2. Goodin, S. (2025, September 8). "Hackers hijack npm packages with 2 billion weekly downloads in supply chain attack." BleepingComputer. Retrieved from https://www.bleepingcomputer.com/news/security/hackers-hijack-npm-packages-with-2-billion-weekly-downloads-in-supply-chain-attack/
  3. Eriksen, C. (2025, September 8). "npm debug and chalk packages compromised." Aikido Security Blog. Retrieved from https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised
  4. GitHub Issue #17. (2025, September 8). "Newest version got hacked with malware." Qix-/node-error-ex repository. Retrieved from https://github.com/Qix-/node-error-ex/issues/17
  5. Valentić, L. (2025, September 5). "Malicious npm Packages Exploit Ethereum Smart Contracts to Target Crypto Developers." The Hacker News. Retrieved from https://thehackernews.com/2025/09/malicious-npm-packages-exploit-ethereum.html

DISCLAIMER: This newsletter is for informational purposes only and does not constitute investment advice, advertising, or a recommendation to buy, sell, or hold any securities. This content is not sponsored by or affiliated with any of the mentioned entities. Investments in cryptocurrencies or other financial assets carry significant risks, including the potential for total loss, extreme volatility, and regulatory uncertainty. Past performance is not indicative of future results. Always consult a qualified financial professional and conduct thorough research before making any investment decisions.