External risk intelligence

HPKE-JS SenderContext Race Condition Allows Loss of Confidentiality and Integrity

CVE advisorySeverity: CRITICAL (CVSS 9.1)

CVE-2025-64767

This is a low-level cryptographic library (hpke-js) designed for use within other applications or packages. As a developer-oriented module providing specific encryption functions, it is not an internet-facing service, application, or appliance itself. Exposure depends entirely on how a third-party developer integrates the library into their own software, making public internet reachability for the library itself highly unlikely.

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 has been identified in a cryptographic module used for encryption, potentially allowing for the compromise of message confidentiality and integrity. This issue stems from a flaw in how nonces are handled during the encryption process. While the library itself is not directly internet-facing, its use within other applications could expose data to risk.

  • Encryption flaws could expose sensitive data.
  • Critical crypto library, affects downstream systems.
  • Confirm relevance and assess potential exposure.

Attack Path

How an attacker could exploit the issue

An attacker could exploit a race condition within the `hpke-js` library's `SenderContext Seal()` function to reuse a nonce. This allows them to compromise the confidentiality and integrity of messages encrypted by the affected module.

  • No authentication or specific user interaction needed.
  • Repeatedly calling the `Seal()` function.
  • Loss of message confidentiality and integrity.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, a race condition in the `SenderContext.Seal()` API could allow for the same nonce to be reused across multiple encryption calls. This may lead to a loss of confidentiality and integrity for the encrypted messages.

  • Encrypted message confidentiality and integrity.
  • Nonce reuse across multiple encryption calls.
  • Compromised message secrecy and authenticity.

Operational Fix

Recommended remediation, mitigation, and detection steps

The `hpke-js` module is a cryptographic library, meaning its exposure is dependent on how it's integrated into other applications. Application owners and platform teams are likely responsible for assessing and remediating this vulnerability. The first practical step is to identify where `hpke-js` is used, confirm its reachability and criticality, and then plan remediation based on risk.

  • Application owners should address this.
  • Verify library usage and exposure.
  • Coordinate updates with 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 hpke-js?

hpke-js is a JavaScript library that provides Hybrid Public Key Encryption capabilities. It is built on top of the Web Cryptography API, allowing developers to implement standardized, secure encryption methods within their own web applications or Node.js environments.

What does CVE-2025-64767 mean for data security?

This vulnerability is classified as CWE-323, which involves the reuse of a nonce in encryption. Because nonces must be unique for each encryption operation to maintain security, this defect allows attackers to break the confidentiality and integrity of messages, effectively rendering the encryption unreliable.

How does the race condition in Seal() get triggered?

The flaw occurs when the library's Seal() function is called repeatedly in a way that triggers a race condition, leading to nonce reuse. This is an internal logic error; simply reading or using the library for standard, non-concurrent operations does not necessarily invoke the bug.

Is my application vulnerable if it uses hpke-js?

According to Halo Surface Signal, this is a low-level library, so it is not internet-facing by itself. Your risk depends entirely on how your specific application integrates and calls the library. If your application handles sensitive data and uses affected versions of the library, the risk flows down to your system.

Do I need to update my software?

If you are using a version of hpke-js prior to 1.7.5, you should plan to update. First, identify where the library is included in your project dependencies. Once confirmed, coordinate an update to version 1.7.5 or higher to resolve the nonce management flaw.

References