CVE-2026-71851

Description

A flaw was found in crypto-js. The CryptoJS.lib.WordArray.random() function, used for generating cryptographic secrets, employs a weak pseudorandom number generator instead of a cryptographically secure source. This significantly reduces the randomness of generated values, such as those used for cryptocurrency wallet recovery phrases. An attacker can exploit this by enumerating the limited possible outputs, potentially recovering private keys and gaining unauthorized control over associated funds in affected applications.

Statement

Impact has been assessed as Important. Exploitation requires a consuming application to specifically call CryptoJS.lib.WordArray.random() to generate security-sensitive values (for example, cryptocurrency wallet recovery phrases); merely depending on a vulnerable crypto-js release is not sufficient to be exploitable. Successful exploitation additionally requires brute-force enumeration of a reduced, but non-trivial, entropy search space rather than a straightforward unauthenticated network attack. Red Hat products bundling crypto-js (as an npm dependency of the .NET SDK, the Vaultwarden web client, Cockatrice, Insights Chrome, Camel Spring Boot, and the Satellite Insights Advisor frontend) already ship crypto-js 4.2.0, which includes the upstream fix, and are not known to use CryptoJS.lib.WordArray.random() to generate security-sensitive values such as cryptographic keys or wallet recovery phrases.

Mitigation

There is no mitigation for this issue other than upgrading to crypto-js 4.0.0 or later, which replaces the affected pseudo-random number generator with the platform's native cryptographic API (Web Crypto API / Node.js crypto module).

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score9N/A9
Attack VectorNetworkN/ANetwork
Attack ComplexityHighN/AHigh
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeChangedN/AChanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

cve.org: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

Understanding the Weakness (CWE)

Access Control,Other

Technical Impact: Bypass Protection Mechanism; Other

An attacker could guess the random numbers generated and could gain unauthorized access to a system if the random numbers are used for authentication and authorization.

Frequently Asked Questions

Want to get errata notifications? Sign up here.