Intel

AIKIDO-2026-554041

crypto-js is vulnerable to Insecure Randomness

CVE-2026-71851Published Aug 6, 2026
August 6, 2026

90

CVE Score

Critical

Insecure Randomness

Are you affected? Scan for Free

TL;DR

CryptoJS.lib.WordArray.random() generates bytes with a Multiply-With-Carry PRNG seeded from Math.random() instead of a cryptographically secure source, so requests for 128- or 256-bit values collapse to roughly 2^39 and 2^47 feasible outputs. An attacker who knows that security-sensitive material was produced through this path can enumerate those outputs and recover secrets such as BIP39 recovery phrases and derived keys. Applying PBKDF2, another KDF, or a hash after the generator does not restore the missing entropy, and upgrading the library alone does not protect values already generated this way. The fix replaces the custom PRNG with the platform native cryptographic random API; any keys, tokens, or recovery phrases produced through the vulnerable path must be treated as compromised and rotated.

How do I fix this?

Upgrade the crypto-js library to the patch version. Rotate any keys, tokens, or recovery phrases produced through the vulnerable path.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses CryptoJS.lib.WordArray.random() to generate security-sensitive values such as keys, tokens, or recovery phrases.

Package

Versions

3.1.2 - 3.1.8

Fixed in 3.2.0

3.3.0 - 3.3.0

Fixed in 4.0.0

Background info

crypto-js is vulnerable to Insecure Randomness in versions 3.1.2 - 3.1.8 and 3.3.0 - 3.3.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea