Coinspect security researchers traced $5.7 million in cryptocurrency thefts to a twelve-year-old flaw in CryptoJS, a popular JavaScript cryptography library. The vulnerability centers on CryptoJS.lib.WordArray.random(), a weak random number generator that failed to produce sufficient entropy for wallet recovery phrase generation.
Five cryptocurrency wallet applications relied on this function to create recovery phrases, the cryptographic backups users employ to restore wallets. The weak RNG allowed attackers to predict or brute-force these phrases, granting unauthorized access to wallet funds.
The thefts occurred across two separate attack waves beginning in late May. Coinspect's blockchain analysis confirmed at least $5.7 million in stolen assets, though the actual total may exceed this figure.
The core problem stems from CryptoJS.lib.WordArray.random() generating insufficient entropy compared to cryptographically secure alternatives. When wallet applications depended on this function instead of proper random number generators like crypto.getRandomValues(), users' recovery phrases became predictable to attackers with moderate computational resources.
Recovery phrases typically consist of 12 or 24 randomly selected words from a standardized list. These seed phrases mathematically derive private keys that control wallet access. If phrase generation lacks true randomness, an attacker can systematically generate candidate phrases and check them against known wallets.
Affected wallet developers had multiple opportunities to avoid this outcome. Native JavaScript provides crypto.getRandomValues() for secure entropy generation. Operating systems and browsers expose cryptographically sound random sources. The twelve-year-old standing of CryptoJS.lib.WordArray.random() meant this weakness persisted despite available alternatives.
For users, the incident underscores wallet selection risk. Application security practices directly impact fund safety. For developers, this represents a cautionary tale about external dependencies. Even popular, established
