crypto-js is vulnerable to Insecure Randomness
90
Critical Risk
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.
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.
crypto-js is vulnerable to Insecure Randomness in versions 3.1.2 - 3.1.8 and 3.3.0 - 3.3.0.
Upgrade the crypto-js library to the patch version. Rotate any keys, tokens, or recovery phrases produced through the vulnerable path.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant