External risk intelligence

Insecure Randomness in crypto-js Affects Wallet Security.

CVE advisorySeverity: CRITICAL (CVSS 9.0)

CVE-2026-71851

This is a vulnerability in a JavaScript cryptography library. It is a build-time dependency used by developers to build applications. It is not an internet-facing service, appliance, or network gateway that is exposed to the public internet by design.

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability exists in a widely used JavaScript library that generates predictable random numbers. This could allow attackers to discover private keys and potentially gain control of associated cryptocurrency funds if the library's flawed random number generation was used to create recovery phrases. The issue is fixed in version 4.0.0.

  • Predictable random numbers can compromise cryptocurrency.
  • This impacts applications using the affected library for key generation.
  • Confirm relevance and review affected cryptocurrency wallet implementations.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this by providing input to a vulnerable JavaScript cryptography library, which is used by wallet applications. If the library generates randomness insecurely, an attacker might be able to guess the randomness, leading to the recovery of private keys and control over associated funds.

  • Requires no authentication or user interaction.
  • Triggers when randomness is generated.
  • Allows recovery of private keys.

Live Threat

Current exploitation, exposure, and threat context

When supported by downstream wallet applications, a weakness in how a JavaScript cryptography library generates random numbers could allow attackers to enumerate reduced output spaces, potentially recovering private keys and gaining control of associated funds.

  • Private keys for cryptocurrency wallets.
  • Weak randomness generation in crypto-js.
  • Loss of control over associated cryptocurrency funds.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability affects applications that use the crypto-js JavaScript library for generating randomness, particularly for BIP39 recovery phrases. The primary responsibility for addressing this issue likely lies with the application development teams and potentially platform teams managing shared libraries. The first practical step is to identify all applications that incorporate this library, confirm their usage of the vulnerable function for generating recovery phrases, and assess their business criticality.

  • Application development teams own the issue.
  • Verify BIP39 phrase generation implementation.
  • Plan updates and redeploy affected applications.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is crypto-js and how is it used?

crypto-js is a popular JavaScript library that provides developers with tools for standard cryptographic tasks, such as hashing, encryption, and encoding. It is typically integrated as a dependency in web and mobile applications to help manage data security. In this context, it is used by developers to handle core functions like generating random numbers for cryptographic purposes.

What is the vulnerability in CVE-2026-71851?

This vulnerability relates to Insufficient Entropy (CWE-331) and Use of Insufficiently Random Values (CWE-338). Instead of relying on modern, secure sources for randomness, affected versions of crypto-js used a custom variation of a mathematical generator seeded by Math.random(). This produces predictable outcomes, making it significantly easier for an attacker to guess the generated values compared to secure alternatives.

How is this random number generation flaw triggered?

The flaw is triggered specifically when a developer calls the library's WordArray.random() function. If an application uses this specific function to generate the entropy needed for BIP39 wallet recovery phrases, it creates a security risk. Simply having the library installed in an application does not trigger the vulnerability; it only occurs when this function is actively used to create sensitive cryptographic keys.

Is my organization at risk from this library?

According to Halo Surface Signal, this is a build-time dependency used by developers, rather than an internet-facing service or appliance. Risk is primarily localized to specific downstream applications that use the library to generate wallet recovery phrases. It is not inherently exposed to the public internet by design, so you should focus on internal audit of software supply chains.

Do I need to update my software?

Yes, if you identify applications that rely on crypto-js versions prior to 4.0.0 for key generation. The first step is to perform an inventory of your codebase to locate where the library is integrated. Once identified, verify if the specific WordArray.random() function is utilized. If it is used for sensitive tasks like generating recovery phrases, update to version 4.0.0 or later to replace the insecure generator.

References