Intel

AIKIDO-2026-554041

crypto-js is vulnerable to Insecure Randomness

Insecure RandomnessCVE-2026-71851 Published Aug 6, 2026

90

Critical Risk

This Affects:

JScrypto-js
3.1.2 - 3.1.8
Fixed in 3.2.0
3.3.0 - 3.3.0
Fixed in 4.0.0
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.

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.

Background info

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

How to fix this

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

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform