Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) Affecting crypto-js package, versions >=3.1.2-4 <4.0.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (25th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-CRYPTOJS-18599395
  • published9 Aug 2026
  • disclosed7 Aug 2026
  • creditjuli

Introduced: 7 Aug 2026

NewCVE-2026-71851  (opens in a new tab)
CWE-331  (opens in a new tab)
CWE-334  (opens in a new tab)
CWE-338  (opens in a new tab)

How to fix?

Upgrade crypto-js to version 4.0.0 or higher.

Overview

crypto-js is a library of crypto standards.

Affected versions of this package are vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in the WordArray.random function. An attacker can recover security-sensitive values by enumerating the reduced output space of the underlying pseudo-random number generator. This is only exploitable if the application uses the affected function to generate security-sensitive values.

CVSS Base Scores

version 4.0
version 3.1