Supply Chain Attack Hijacks NPM Crypto Tools with Stealthy Browser Malware

Generated by AI AgentCoin World
Tuesday, Sep 9, 2025 10:24 am ET2min read
BTC--
ETH--
LTC--
SOL--
Aime RobotAime Summary

- A sophisticated supply chain attack compromised 18 popular npm packages (e.g., chalk, debug), affecting over 2 billion weekly downloads in crypto/Web3 ecosystems.

- Attackers used phishing emails to gain access, injecting browser-based cryptostealers that manipulate crypto transactions by altering API calls and wallet addresses.

- The malware operates stealthily across multiple layers, rewriting transaction data in real-time while maintaining deceptive UI legitimacy to avoid detection.

- Rapid community response limited damage, but the incident highlights critical vulnerabilities in open-source ecosystems, prompting security recommendations like npm ci and continuous package integrity checks.

A series of JavaScript packages on npm, including widely used tools like `chalk`, `debug`, and `ansi-styles`, were recently compromised by a sophisticated supply chain attack. The malicious code was injected into 18 packages, collectively accounting for over 2 billion weekly downloads. These packages are integral to web development and are commonly used in the cryptocurrency and Web3 ecosystems. The attack exploited a phishing campaign targeting package maintainers, with one maintainer, known as “qix,” reportedly falling victim to a deceptive email from a recently registered domain, `npmjs.help`. The email prompted the maintainer to update two-factor authentication settings, a common tactic to gain unauthorized access [1].

The compromised code introduced a cryptostealer that operates within the browser, manipulating crypto wallet interactions and redirecting transactions to attacker-controlled addresses. The malware targets multiple blockchain platforms, including EthereumETH--, SolanaSOL--, BitcoinBTC--, and LitecoinLTC--, by hooking into browser APIs such as `fetch` and `XMLHttpRequest`. It alters transaction data before it is signed by the user, making it difficult to detect. The attack leverages look-alike wallet addresses, using string-matching logic to make the changes appear legitimate to the untrained eye. This approach reduces the likelihood of user suspicion during transaction reviews [2].

According to security analysts, the malware operates at multiple levels—altering website content, API calls, and wallet transactions. It modifies what users see and interact with, ensuring that even if the UI appears correct, the underlying transaction is compromised. This multi-layered approach increases the stealth and effectiveness of the attack, making it particularly dangerous for Web3 developers and users. The malicious code was found to be active in the browser environment, monitoring for sensitive activity and rewriting transaction details in real time [3].

The attack was discovered quickly due to the responsiveness of the open-source community and security tools like Aikido Security and Semgrep. Upon notification, the affected maintainer began removing compromised versions, and many of the malicious packages were taken down before they could cause widespread damage. The speed of the response likely limited the attack’s impact. As of the latest reports, some packages, like `simple-swizzle`, remained compromised for a short period before being addressed. Despite the rapid response, the incident highlights the vulnerability of decentralized development ecosystems to targeted phishing attacks and the potential for widespread compromise through supply chain vulnerabilities [1].

In response, security experts recommend that developers implement additional safeguards, such as using `npm ci` in build pipelines to ensure exact dependency versions are installed. It is also advised to re-scan projects that may have included compromised versions during the attack window. Tools like Checkmarx Malicious Package and Semgrep have open-sourced detection rules to help identify whether a project was affected. The attack underscores the importance of maintaining strict access controls, phishing awareness, and continuous monitoring of package integrity in the JavaScript ecosystem [2].

Source: [1] npm debug and chalk packages compromised (https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised) [2] Security Alert | chalk, debug and color on npm ... (https://semgrep.dev/blog/2025/chalk-debug-and-color-on-npm-compromised-in-new-supply-chain-attack) [3] Chalk And 17 Other NPM Packages Compromised In ... (https://checkmarx.com/zero-post/chalk-and-17-other-npm-packages-compromised-in-supply-chain-attack/)

Quickly understand the history and background of various well-known coins

Latest Articles

Stay ahead of the market.

Get curated U.S. market news, insights and key dates delivered to your inbox.