CVE-2026-71851: CWE-331: Insufficient Entropy in brix crypto-js
crypto-js versions prior to 4.0.0 use an insecure pseudorandom number generator seeded from Math.random() in CryptoJS.lib.WordArray.random(), resulting in insufficient entropy. This weakness reduces the effective search space for generated randomness, enabling attackers to enumerate possible outputs and recover private keys in downstream wallet applications that rely on this function for BIP39 recovery phrase entropy. The 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 versions prior to 4.0.0 use an insecure pseudorandom number generator seeded from Math.random() in CryptoJS.lib.WordArray.random(), resulting in insufficient entropy. This weakness reduces the effective search space for generated randomness, enabling attackers to enumerate possible outputs and recover private keys in downstream wallet applications that rely on this function for BIP39 recovery phrase entropy. The issue is fixed in version 4.0.0.
CVSS v3.1
Score 9.0critical
Affected software
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
- Remediation Level
- null
Threat ID: 6a76a1f5bf8831d539e121b4
Added to database: 08/08/2026, 03:26:45 UTC
Last enriched: 08/08/2026, 03:41:06 UTC
Last updated: 08/08/2026, 03:41:06 UTC
Views: 4
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.