Malicious Releases of chalk and strip-ansi Expose npm’s Transitive Dependency Risk in Web3‑Focused Supply Chain Attack

CyberSecureFox 🦊

A coordinated phishing campaign against a high-profile npm maintainer enabled attackers to publish malicious versions of widely used JavaScript packages, including chalk and strip-ansi. Together, these packages account for more than 2.6 billion downloads per week, amplifying downstream risk through npm’s transitive dependency model. While early analysis suggests limited direct financial losses, the incident underscores the systemic fragility of software supply chains.

Phishing the maintainer: how the npm account was compromised

On 8 September 2025, maintainer Josh Junon (Qix) confirmed that multiple accounts had been taken over following targeted phishing. Attack emails originated from support@npmjs[.]help, a domain registered on 5 September 2025 and crafted to mimic the legitimate npmjs.com brand. The message pressured recipients to “update 2FA” before an alleged deadline, a common pretext to harvest credentials and session tokens.

According to reporting by BleepingComputer, the phishing site’s login flow exfiltrated credentials to an external endpoint at https://websocket-api2[.]publicvm[.]com/…, indicating token theft alongside password capture. The maintainer apologized post-incident and initiated recovery actions while the npm security team removed the malicious releases.

Scope and exposure across JavaScript dependencies

Security firm Socket assessed that compromise of the Qix account allowed adversaries to ship tainted versions of popular dependencies on which “countless applications, libraries, and frameworks” rely. Transitive dependencies—packages brought in indirectly by other dependencies—magnify blast radius because developers may never interact with the compromised packages directly yet still inherit their code in production builds.

Technical analysis: browser-side malware targeting web3

Researchers at Aikido Security found approximately 280 lines of injected logic in index.js. The code executes client-side in the browser and focuses on hijacking cryptocurrency operations. It hooks core JavaScript primitives and web3 interfaces—such as fetch, XMLHttpRequest, and wallet APIs like window.ethereum (plus Solana and others)—to monitor and alter on-chain transactions.

The malicious routine attempts recipient address substitution for Ethereum, Bitcoin, Solana, Tron, Litecoin, and Bitcoin Cash transfers, swapping a user’s intended destination for attacker-controlled addresses before the user signs the transaction. Because the interception occurs prior to signature, UI-based verification within the dApp can fail to reveal the substitution.

Why the immediate financial damage was limited

Despite the breadth of exposure, Security Alliance (SEAL) and VXUnderground estimate adversary proceeds at mere cents to roughly $50. Analysts observed implementation mistakes: in some cases, the malware substituted swap contract details (e.g., Uniswap) rather than valid wallet addresses, effectively nullifying theft attempts.

BleepingComputer further noted that the payload primarily triggers under specific browser conditions and does not typically execute in server-side contexts. That constraint sharply narrowed real-world impact, though the threat to web3 users remains material.

Risk mitigation for organizations and end users

Actions for developers, maintainers, and DevSecOps

– Rebuild and redeploy client-side applications after removing tainted dependencies; pin exact versions, use lockfiles, and verify artifact hashes.
– Enforce mandatory 2FA for npm and GitHub; prefer least-privilege tokens, SSO, and routinely revoke stale tokens.
– Strengthen supply chain controls: continuous integrity monitoring, SCA and Dependency Review, artifact signing (e.g., Sigstore), and approval policies for maintainer releases.
– Implement Content Security Policy (CSP) and Subresource Integrity (SRI) to reduce the risk of executing tampered JavaScript.

Guidance for web3 users and crypto investors

– Use hardware wallets and verify the recipient address on the device screen before signing. Ledger CTO Charles Guillemet advises postponing on-chain activity if hardware verification is unavailable.
– Avoid links in unsolicited 2FA or security emails; access accounts via bookmarks or manually typed URLs.
– Update compromised apps and extensions, clear cache and Service Workers, and audit browser extensions and autofill scripts.

This incident highlights how a single maintainer compromise can echo across the JavaScript ecosystem via transitive dependencies. Even with limited immediate theft, the reputational and user safety risks are significant. Organizations should accelerate adoption of signed builds, stricter release governance, and comprehensive dependency hygiene, while users should rely on hardware verification and cautious operational security to thwart similar web3‑focused attacks.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.