CVE-2026-71851 is a critical-severity (CVSS 9) CWE-331 vulnerability in crypto-js. A fix is available for crypto-js — see the affected versions and patch details below.
crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-71851.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-71851 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.
crypto-jsnpmDescription
Summary
CryptoJS.lib.WordArray.random() in affected versions is not a cryptographically secure random number generator. Nominal requests for 128 or 256 bits of entropy produce effective search spaces of approximately 2^39 and 2^47 possibilities — small enough to enumerate on commodity hardware.
Coinspect's Ill Bloom investigation confirmed that downstream wallet applications used this function as the entropy source for BIP39 recovery phrases.
An application is affected only if it uses the vulnerable function to generate security-sensitive values.
Merely depending on crypto-js < 4.0.0 is not sufficient to be exploitable.
Details
The affected implementation used a custom variation of George Marsaglia's Multiply-With-Carry PRNG, seeded from Math.random(). It was introduced in 3.1.2-4 (June 2014, commit brix/crypto-js@ff1f003) in response to issue #7, and was present in every 3.x release except 3.2.0 and 3.2.1. That change was reverted in 3.3.0 because it was considered a breaking change, so projects tracking the 3.x line could resolve to newer versions that still contained the weak generator.
4.0.0 replaced the generator with the platform's native cryptographic API.
Applying PBKDF2, another KDF, or a cryptographic hash after the vulnerable generator does not restore missing entropy.
Proof of concept
Coinspect reproduced the attack end to end:
- Reimplemented the affected
WordArray.random()behavior. - Enumerated the feasible outputs of the underlying PRNG.
- Converted candidate entropy values into valid BIP39 recovery phrases.
- Derived private keys and addresses across the relevant derivation paths and networks.
- Compared derived addresses against public blockchain data.
- Recovered the private keys controlling funded addresses.
Impact
An attacker can enumerate the reduced output space and recover security-sensitive values generated through the affected function.
Coinspect documented coordinated drain waves affecting addresses derived from vulnerable recovery phrases. As of July 13, 2026, the measured lower bound of stolen assets across the two events was approximately $5M.
The consequences are persistent:
- Updating an affected library or wallet does not strengthen a previously generated secret.
- Importing the same recovery phrase into an updated software or hardware wallet does not remediate the issue.
- Previously generated secrets may remain exploitable indefinitely.
- Future deposits to an affected address may also be stolen.
- Assets may remain exposed across networks or derivation paths that have not yet shown suspicious activity.
Remediation
For projects:
- Upgrade
crypto-jsto version4.0.0or later. Where possible, replace CryptoJS randomness with the native Web Crypto API or Node.jscryptomodule. - Audit direct, downstream, and transitive dependencies for versions of
crypto-jsmatching< 4.0.0. - Determine whether
CryptoJS.lib.WordArray.random()was used to generate any security-sensitive values. - Identify the time periods and application versions during which the vulnerable generation path was present.
- Treat all long-term secrets generated through an affected path as compromised and rotate them.
- Notify affected users that installing an update is insufficient when a long-term secret was generated by the vulnerable code.
For wallet users: create a new wallet with a newly generated recovery phrase from a trustworthy source and migrate assets to addresses derived from it. Do not import the existing recovery phrase into the new wallet.
Public address checker
Coinspect provides a public checker for addresses identified in the known Ill Bloom exposed-address datasets:
Only public blockchain addresses should be entered. Users must never enter a recovery phrase, seed phrase, mnemonic, private key, password, or wallet backup file.
A match indicates that funds controlled by the same recovery phrase may be at immediate risk. A negative result only means that the submitted address was not found in the currently published datasets.
References
- Ill Bloom research site and public address checker:
https://illbloom.org/ - Coinspect investigation overview:
https://www.coinspect.com/blog/ill-bloom-investigation/ - CryptoJS issue #7 —
randomBytes is not random enough:
https://github.com/brix/crypto-js/issues/7 - Commit introducing the MWC-based implementation:
https://github.com/brix/crypto-js/commit/ff1f0032ff58aedfcc44eb6aa7b2c78207a98009 - Changes between CryptoJS
3.3.0and4.0.0:
https://github.com/brix/crypto-js/compare/3.3.0...4.0.0 - Downstream
ferrumnet/bip39fork:
https://github.com/ferrumnet/bip39
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | crypto-js | all versions | 4.0.0npm install crypto-js@4.0.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for crypto-js, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update crypto-js to 4.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-71851 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-71851 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-71851. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-71851 in your dependencies?
O3 Security finds CVE-2026-71851 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.