Skip to main content
Mallory
← Back to News
open-source-dependency-vulnerabilitycryptocurrency-platform-riskwidely-deployed-product-advisory

Critical crypto-js PRNG flaw exposed wallet seeds and cryptographic keys

Vulnerability Disclosure · 2 sources · Updated 4mo ago · First seen Aug 7, 2026

Critical crypto-js PRNG flaw exposed wallet seeds and cryptographic keys

A critical vulnerability tracked as CVE-2026-71851 was disclosed in the JavaScript cryptography library crypto-js, affecting versions prior to 4.0.0. The flaw lies in CryptoJS.lib.WordArray.random(), which used a custom Multiply-With-Carry pseudorandom number generator seeded with Math.random() rather than a cryptographically secure operating-system entropy source. That design sharply reduced the effective entropy of supposedly strong random outputs, making generated keys, initialization vectors, and other secrets potentially predictable or reconstructable.

The weakness is especially serious for cryptocurrency wallets and decentralized applications that used the function to generate entropy for BIP39 recovery phrases, because attackers may be able to recover private keys and steal funds from affected wallets. Reports assign the issue a CVSS v3.1 score of 9.0 and map it to CWE-331, CWE-338, and CWE-334. The issue is fixed in crypto-js 4.0.0, and secure alternatives cited for randomness generation include browser window.crypto.getRandomValues() and Node.js crypto.randomBytes().

Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

3 events · Aug 7, 2026
  1. Reported Aug 7, 20264mo ago

    crypto-js 4.0.0 fixes weak randomness flaw

    The insufficient-entropy issue in CryptoJS.lib.WordArray.random() was fixed in crypto-js version 4.0.0. The fix replaced the vulnerable behavior present across nearly all 3.x releases.

    CVE-2026-71851 - crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain
  2. Reported Aug 7, 20264mo ago

    Insecure PRNG introduced in crypto-js 3.1.2-4

    The vulnerable custom Multiply-With-Carry pseudorandom number generator seeded from Math.random() was introduced in crypto-js version 3.1.2-4, affecting CryptoJS.lib.WordArray.random(). This design weakened entropy for cryptographic secrets generated by downstream applications.

    CVE-2026-71851 - crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain
  3. Aug 7, 20264mo ago

    GitHub Security Advisories receives CVE-2026-71851

    GitHub Security Advisories newly received the CVE-2026-71851 entry for the crypto-js weak-PRNG vulnerability. The issue describes reduced entropy in CryptoJS.lib.WordArray.random() that could enable recovery of wallet seed phrases and private keys.

    CVE-2026-71851 - crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Vulnerabilities

1 linked
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.