CryptoJS Randomness Bug Exposed Wallet Secrets

INCIBE says CryptoJS versions before 4.0.0 are affected by CVE-2026-71851, a critical flaw in `CryptoJS.lib.WordArray.random()` that can expose private keys in wallets and recovery tools. The advisory was published August 10, 2026. The helper was never a cryptographically secure random generator, so anything built from its output can come from a much smaller pool of possible values than it appears to. If a wallet or BIP39 recovery tool used it to mint a seed or phrase, an attacker can try the possibilities offline until the private key is recovered, which turns old secret generation into a fund-theft problem. That makes the exposure conditional on how the library was used: apps that only used crypto-js for ordinary data do not inherit this risk, but JavaScript wallet software and seed tooling that trusted this function do. The fix is a library update, but the lasting issue is whether any past secrets were generated from weak entropy.

Part of the PlainSec briefing for 2026-08-10

Editions

Sources