CryptoJS lib.WordArray.random() Weak RNG Leads to $5.7 Million Theft Across Five Crypto‑Wallet Apps
What Happened — Researchers at Coinspect discovered that the CryptoJS.lib.WordArray.random() function, part of the widely‑used CryptoJS JavaScript library, generates insufficient entropy. Wallet applications that relied on this function to create recovery phrases produced predictable values, enabling attackers to reconstruct private keys and drain funds. The on‑chain analysis attributes at least $5.7 million in losses across five different crypto‑wallet products since late May 2026.
Why It Matters for Compliance & Audit Readiness
- The incident is a textbook example of a credential‑generation weakness that SOC 2 access‑control criteria (CC6.1, CC6.2) are designed to detect, document, and remediate.
- Continuous evidence of secure cryptographic practices—such as validated RNGs and third‑party library attestations—provides defensible audit trails and demonstrates due‑diligence to regulators and partners.
Who Is Affected — FinTech / cryptocurrency wallet providers, their end‑users, and any downstream services that integrate the compromised wallets (e.g., exchanges, DeFi platforms).
Recommended Actions
- Inventory all applications that embed CryptoJS and verify the version; upgrade to a library version that replaces
WordArray.random()with a cryptographically‑secure RNG (e.g., Web Crypto API). - Map the weakness to SOC 2 access‑control controls (CC6.1 – Logical Access Controls) and capture remediation evidence (patch logs, test results) for audit readiness.
- Implement a secure‑coding policy that mandates third‑party cryptographic component review and periodic independent verification.
Technical Notes — The vulnerable function resides in CryptoJS v3.x‑v4.x (no CVE assigned yet). Attackers exploited predictable recovery phrases generated by the weak RNG, leading to private‑key reconstruction and unauthorized on‑chain transfers. Source: The Hacker News