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

Published Aug 7, 2026
·
Updated

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:

1. Reimplemented the affected WordArray.random() behavior. 2. Enumerated the feasible outputs of the underlying PRNG. 3. Converted candidate entropy values into valid BIP39 recovery phrases. 4. Derived private keys and addresses across the relevant derivation paths and networks. 5. Compared derived addresses against public blockchain data. 6. 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:

1. Upgrade crypto-js to version 4.0.0 or later. Where possible, replace CryptoJS randomness with the native Web Crypto API or Node.js crypto module. 2. Audit direct, downstream, and transitive dependencies for versions of crypto-js matching < 4.0.0. 3. Determine whether CryptoJS.lib.WordArray.random() was used to generate any security-sensitive values. 4. Identify the time periods and application versions during which the vulnerable generation path was present. 5. Treat all long-term secrets generated through an affected path as compromised and rotate them. 6. 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:

https://illbloom.org/

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.0 and 4.0.0: https://github.com/brix/crypto-js/compare/3.3.0...4.0.0 Downstream ferrumnet/bip39 fork: https://github.com/ferrumnet/bip39

Other sources

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.

MITRE

Affected Software

1 affected componentFixes available
npm/crypto-js<4.0.0
4.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/crypto-js to a version that resolves this vulnerability.

    Fixed in 4.0.0
  2. Upgrade

    Upgrade crypto-js to a version that resolves this vulnerability.

    Fixed in 4.0.0
  3. Configuration

    Where possible, replace CryptoJS randomness used for BIP39 recovery-phrase entropy with the native cryptographically secure Web Crypto API or the Node.js `crypto` module, because in versions prior to 4.0.0 `CryptoJS.lib.WordArray.random()` uses a custom Multiply-With-Carry PRNG seeded from `Math.random()`.

    CryptoJS.lib.WordArray.random() entropy_source = replace with platform native Web Crypto API or Node.js crypto module
  4. Operational

    If any long-term secrets (e.g., BIP39 recovery phrases/seeds/private keys derived from them) were generated through the affected path, treat them as compromised and rotate them (previously generated secrets may remain exploitable indefinitely).

  5. Operational

    Do not import the existing recovery phrase/seed phrase/mnemonic/private key/password or wallet backup file into an updated software or hardware wallet; instead, create a new wallet with a newly generated recovery phrase from a trustworthy source and migrate assets to addresses derived from the new phrase.

Event History

Aug 7, 2026
CVE Published
via MITRE·06:48 PM
Data Sourced
via MITRE·06:48 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:48 PM
Data Sourced
via GitHub·06:48 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·07:18 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-71851?

CVE-2026-71851 is classified as critical with a severity score of 9.

2

What software is affected by CVE-2026-71851?

CVE-2026-71851 affects the npm/crypto-js library.

3

How does CVE-2026-71851 impact security?

CVE-2026-71851 results from a weak random number generator that can lead to predictable cryptographic keys.

4

How can I mitigate the risks associated with CVE-2026-71851?

To mitigate CVE-2026-71851, it is recommended to upgrade to secure versions of the crypto-js library or replace it with a more secure alternative.

5

What kind of vulnerability is CVE-2026-71851 classified as?

CVE-2026-71851 is classified as a Weak RNG vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203