CVE-2026-65630 in joseinfo

Summary

by MITRE • 10/26/2026

Observable Timing Discrepancy vulnerability in potatosalad jose allows recovery of a long-term X25519 private key through a timing side channel in the pure-Erlang Curve25519 fallback.

The pure-Erlang X25519 implementation performs scalar multiplication over the secret private key using a recursive Montgomery ladder (jose_jwa_x25519:curve25519/2) whose clauses branch on individual bits of the clamped private scalar, and whose per-step operations (jose_jwa_x25519:montgomery_add/3 and jose_jwa_x25519:montgomery_double/1) and field inversion are built from value-dependent Erlang bignum arithmetic (multiplication, remainder, and modular exponentiation). Although the ladder is operation-count balanced and fixed at 254 steps, the concrete integer values processed at each step, and therefore the running time, depend on the secret scalar. The execution time of the public entry points jose_jwa_x25519:scalarmult/2, jose_jwa_x25519:x25519/2, jose_jwa_x25519:x25519_base/1, and jose_jwa_x25519:sk_to_pk/1 is thus a function of the private key.

This path is reachable from the public API, most notably when a service decrypts attacker-supplied ECDH-ES (JWE) messages with a long-term X25519 key (for example through JOSE.JWK.box_decrypt_ecdh_es/2, which reaches jose_jwa_curve25519:x25519_shared_secret/2 and the ladder). An attacker who can submit ciphertexts and measure decryption timing can, in principle, recover the private key bit by bit, defeating the resistance X25519 was designed to provide. Recovery of the key compromises the confidentiality and authenticity of all data protected by it.

This issue affects jose: from 1.10.0 before 1.11.13.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 10/26/2026

The vulnerability identified as an Observable Timing Discrepancy in the potatosalad/jose library represents a critical side-channel attack vector within its pure-Erlang implementation of X25519 key exchange. This flaw specifically targets the fallback cryptographic module, which is invoked when hardware-accelerated or optimized C-based implementations are unavailable. The core technical deficiency lies in the recursive Montgomery ladder algorithm used for scalar multiplication over the secret private key. While the algorithm maintains a fixed number of 254 steps to prevent simple loop-counting attacks, it fails to ensure constant-time execution at the instruction level. The branching logic within jose_jwa_x25519:curve25519/2 depends on individual bits of the clamped private scalar, causing variations in computational complexity that correlate directly with the secret key material.

The operational mechanism of this side channel relies on value-dependent Erlang bignum arithmetic operations such as multiplication, remainder calculations, and modular exponentiation performed within jose_jwa_x25519:montgomery_add/3 and jose_jwa_x25519:montgomery_double/1. Although the high-level control flow is balanced, the underlying integer processing time fluctuates based on the magnitude of intermediate values derived from the private key bits. Consequently, the total execution time for public entry points including jose_jwa_x25519:scalarmult/2, jose_jwa_x25519:x25519/2, jose_jwa_x25519:x25519_base/1, and jose_jwa_x25519:sk_to_pk/1 becomes a measurable function of the private key. This timing variance provides an attacker with observable data points that can be statistically analyzed to deduce secret information over multiple encryption or decryption operations.

The practical impact of this vulnerability is severe as it allows for the complete recovery of long-term X25519 private keys through remote timing analysis. The attack path is readily accessible via standard JOSE workflows, particularly when a service decrypts Elliptic Curve Diffie-Hellman Ephemeral Static messages using JWE encryption mechanisms like jose.JWK.box_decrypt_ecdh_es/2. An adversary who can submit crafted ciphertexts to the vulnerable endpoint and measure response times can perform a bit-by-bit key recovery attack. This effectively neutralizes the security guarantees provided by X25519, as the mathematical hardness assumptions are bypassed through physical execution characteristics rather than cryptographic weakness.

The compromise of these private keys leads to catastrophic consequences for data confidentiality and authenticity. Once an attacker recovers the long-term X25519 key, they can decrypt all previously captured encrypted communications protected by that key and forge new messages with valid authentication signatures. This undermines trust in any system relying on jose: 1.10.0 through versions prior to 1.11.13 for secure key exchange operations. The vulnerability aligns with CWE-208, which describes observable timing discrepancies, and maps to the ATT&CK technique of Side Channel Attacks where attackers exploit information leaked during the execution of a cryptographic algorithm rather than breaking it mathematically.

Mitigation requires immediate upgrading to jose version 1.11.13 or later, where this implementation flaw has been addressed. In environments where upgrading is not immediately feasible, administrators should ensure that the optimized C-based implementations are prioritized over the pure-Erlang fallback by configuring appropriate compilation flags or runtime options if supported by the deployment environment. Additionally, implementing request rate limiting and adding random jitter to response times can reduce the precision of timing measurements available to an attacker, serving as a temporary compensating control until the software patch is applied.

Responsible

EEF

Reservation

07/22/2026

Disclosure

10/26/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!