A critical security flaw has been discovered in versions 1.95.6 and 1.95.7 of the widely used @solana/web3.js npm library, a JavaScript tool crucial for Solana blockchain applications. This supply chain attack, affecting over 350,000 weekly downloads, injected malicious code designed to steal private keys. The compromised code, concealed within legitimate code paths, exfiltrated private keys to a hardcoded Solana address (FnvLGtucz4E1ppJHRTev6Qv4X7g8Pw6WPStHCcbAKbfx) via Cloudflare headers, potentially leading to cryptocurrency theft from both developers and end-users. The attack, believed to stem from a phishing or social engineering campaign against library maintainers, underscores the vulnerability of software supply chains in the crypto space.
Developers are strongly urged to immediately update to version 1.95.8 or downgrade to version 1.95.5 of the @solana/web3.js library. Those who suspect their keys may be compromised are advised to rotate their authority keys. The compromised versions are no longer available for download. While non-custodial wallets are not affected, this incident highlights the serious risks associated with compromised open-source libraries and the importance of vigilant security practices within the development ecosystem. The compromised versions, which attracted over 50 million downloads, were identified and reported across several cybersecurity news outlets including Malware News, BleepingComputer, Cyber Insider, and The Hacker News.