Impact
The vulnerability is caused by the CryptoJS.lib.WordArray.random() function utilizing a custom Multiply‑With‑Carry pseudorandom number generator seeded from Math.random() in versions prior to 4.0.0. This produces only about 2^39 to 2^47 bits of entropy instead of the intended 128 or 256 bits. When wallet applications use this function to generate BIP39 recovery phrases, the small search space can be exhaustively enumerated on commodity hardware, enabling an attacker to recover the private key and control the associated funds. The weakness falls under CWE‑331, CWE‑334, and CWE‑338.
Affected Systems
The affected product is the JavaScript library brix:crypto‑js in all releases before 4.0.0. Any downstream wallet or crypto application that relies on CryptoJS.lib.WordArray.random() for key generation or recovery phrase creation is also impacted.
Risk and Exploitability
The CVSS score of 9 indicates a critical severity, but the EPSS score is not available, so the current exploitation probability is unknown. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires that the vulnerable library be active in the application, and the attacker must enumerate the reduced entropy space to derive the key. If the library is used in a client‑side or server‑side key‑generation flow, an attacker can generate the private key by brute‑forcing the weakened randomness.
OpenCVE Enrichment
Github GHSA