CVE-2026-71851: CWE-331: Insufficient Entropy in brix crypto-js
crypto-js is a JavaScript library of crypto standards. Versions of crypto-js prior to 4.0.0 generate randomness in CryptoJS.lib.WordArray.random() using a custom variation of the Multiply-With-Carry pseudorandom number generator, seeded from Math.random(), instead of a cryptographically secure source. This generator was introduced in version 3.1.2-4 and remained present in nearly every 3.x release. Nominal requests for 128 or 256 bits of entropy through this function produce effective search spaces of approximately 2 to the 39th and 2 to the 47th possibilities, small enough to enumerate on commodity hardware. Downstream wallet applications that used CryptoJS.lib.WordArray.random() as the entropy source for BIP39 recovery phrases are affected, and an attacker who enumerates the reduced output space can recover the resulting private keys and control the associated funds. This issue is fixed in version 4.0.0.
AI Analysis
Technical Summary
The crypto-js JavaScript library versions before 4.0.0 generate randomness in CryptoJS.lib.WordArray.random() using a custom Multiply-With-Carry pseudorandom number generator seeded from Math.random(), which is not cryptographically secure. This results in effective entropy search spaces of approximately 2^39 for 128-bit requests and 2^47 for 256-bit requests, which are small enough to be enumerated on commodity hardware. Wallet applications that use this function as the entropy source for BIP39 recovery phrases are vulnerable to private key recovery attacks. The vulnerability was introduced in version 3.1.2-4 and affects nearly all 3.x releases. The issue is resolved in version 4.0.0.
Potential Impact
An attacker who enumerates the reduced output space of the insecure random number generator can recover private keys derived from BIP39 recovery phrases generated using CryptoJS.lib.WordArray.random(). This leads to full compromise of the associated cryptocurrency wallets, including confidentiality, integrity, and availability impacts. The CVSS score of 9 indicates critical severity with network attack vector, high complexity, no privileges required, no user interaction, and complete impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade to crypto-js version 4.0.0 or later, where the insecure pseudorandom number generator has been replaced with a cryptographically secure source. Avoid using CryptoJS.lib.WordArray.random() from versions prior to 4.0.0 for cryptographic entropy, especially in wallet or key generation contexts. Patch status is not explicitly stated in the vendor advisory, but the fix is included in version 4.0.0.
CVE-2026-71851: CWE-331: Insufficient Entropy in brix crypto-js
Description
crypto-js is a JavaScript library of crypto standards. Versions of crypto-js prior to 4.0.0 generate randomness in CryptoJS.lib.WordArray.random() using a custom variation of the Multiply-With-Carry pseudorandom number generator, seeded from Math.random(), instead of a cryptographically secure source. This generator was introduced in version 3.1.2-4 and remained present in nearly every 3.x release. Nominal requests for 128 or 256 bits of entropy through this function produce effective search spaces of approximately 2 to the 39th and 2 to the 47th possibilities, small enough to enumerate on commodity hardware. Downstream wallet applications that used CryptoJS.lib.WordArray.random() as the entropy source for BIP39 recovery phrases are affected, and an attacker who enumerates the reduced output space can recover the resulting private keys and control the associated funds. This issue is fixed in version 4.0.0.
CVSS v3.1
Score 9.0critical
Affected software
brix
crypto-js
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The crypto-js JavaScript library versions before 4.0.0 generate randomness in CryptoJS.lib.WordArray.random() using a custom Multiply-With-Carry pseudorandom number generator seeded from Math.random(), which is not cryptographically secure. This results in effective entropy search spaces of approximately 2^39 for 128-bit requests and 2^47 for 256-bit requests, which are small enough to be enumerated on commodity hardware. Wallet applications that use this function as the entropy source for BIP39 recovery phrases are vulnerable to private key recovery attacks. The vulnerability was introduced in version 3.1.2-4 and affects nearly all 3.x releases. The issue is resolved in version 4.0.0.
Potential Impact
An attacker who enumerates the reduced output space of the insecure random number generator can recover private keys derived from BIP39 recovery phrases generated using CryptoJS.lib.WordArray.random(). This leads to full compromise of the associated cryptocurrency wallets, including confidentiality, integrity, and availability impacts. The CVSS score of 9 indicates critical severity with network attack vector, high complexity, no privileges required, no user interaction, and complete impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade to crypto-js version 4.0.0 or later, where the insecure pseudorandom number generator has been replaced with a cryptographically secure source. Avoid using CryptoJS.lib.WordArray.random() from versions prior to 4.0.0 for cryptographic entropy, especially in wallet or key generation contexts. Patch status is not explicitly stated in the vendor advisory, but the fix is included in version 4.0.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-07T18:26:53.523Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a76a1f5bf8831d539e121b4
Added to database: 08/08/2026, 03:26:45 UTC
Last enriched: 08/08/2026, 03:41:06 UTC
Last updated: 09/22/2026, 14:17:34 UTC
Views: 174
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.