🔴 Critical | Source: The Hacker News
A weak random number generator in the widely-used CryptoJS JavaScript library has been exploited to drain at least $5.7 million from five cryptocurrency wallet applications. The vulnerable function, CryptoJS.lib.WordArray.random(), has been present in the library for 12 years and produces insufficiently random entropy when generating wallet recovery phrases. Attackers were able to predict or reconstruct private keys derived from this weak entropy, leading to two waves of theft since late May.
Security Architect’s Take: Audit any application — not just crypto wallets — that uses CryptoJS for key generation, token creation, or any security-sensitive randomness; replace CryptoJS.lib.WordArray.random() immediately with the Web Crypto API’s crypto.getRandomValues() or a platform-native CSPRNG. Additionally, review your software supply chain policies to ensure cryptographic primitives are sourced from actively maintained, audited libraries rather than legacy dependencies.
Original advisory: CryptoJS Weak RNG Behind $5.7 Million in Drains Affects Five Crypto Wallet Apps