Hackers Exploit Solana Developers Through JavaScript Library Substitution

solana sol hacked.jpg

Hackers compromised the JavaScript library @solana/web3.js, a critical tool used by developers to build decentralized applications on the Solana blockchain. The breach was reported by analysts at Anza.

On December 2, the attackers gained access to the account maintaining the library. They tampered with versions 1.95.6 and 1.95.7, embedding malicious code designed to extract private keys and drain funds from protocols.

Projects or systems that downloaded and implemented these files unknowingly exposed themselves to exploitation. According to data from Solscan, the attack resulted in losses of approximately $160,000 in digital assets.

Scope of the Exploit

Anza clarified that the exploit did not target the Solana network itself but rather the developer library. The malicious code only affected applications that directly handle private keys, such as bots. However, Anza has not disclosed the identities of the affected projects.

Developer Response

Experts urged all Solana developers to update their JavaScript libraries to the latest versions.

The team behind the Phantom crypto wallet reassured users that they had never integrated the compromised library versions, ensuring user funds remained safe.

Other major projects, including Solflare, Drift, and Backpack, also confirmed they were unaffected by the attack.

Context and Broader Impact

Earlier, the XT exchange suffered a breach where hackers stole $1.7 million in assets.

As of Q3 2024, the crypto industry had recorded losses totaling $753 million across 155 incidents involving hacks, exploits, and scams, reflecting ongoing vulnerabilities within the space.

Takeaway

This incident underscores the importance of vigilant library management and rapid response measures in maintaining the security of blockchain ecosystems.