Timing side-channel in pure-Erlang X25519 scalar multiplication leaks the private key in jose
Summary
| CVE | CVE-2026-65630 |
|---|---|
| State | PUBLISHED |
| Assigner | EEF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-10-26 20:17:58 UTC |
| Updated | 2026-10-26 20:17:58 UTC |
| Description | 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. |
Risk And Classification
Primary CVSS: v4.0 5.9 MEDIUM from 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Problem Types: CWE-208 | CWE-208 CWE-208 Observable Timing Discrepancy
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | Secondary | 5.9 | MEDIUM | CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/C... |
| 4.0 | CNA | CVSS | 5.9 | MEDIUM | CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
CVSS v4.0 Breakdown
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Potatosalad | Jose | affected 1.10.0 1.11.13 semver | Not specified |
| CNA | Potatosalad | Jose | affected 8e532095de114ef4bf88a9ec5d651fa251a972b3 3670f873c274bba86fb7f5ee5727a7efa1322b79 git | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| osv.dev/vulnerability/EEF-CVE-2026-65630 | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | osv.dev | |
| cna.erlef.org/cves/CVE-2026-65630.html | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | cna.erlef.org | |
| github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | github.com | |
| github.com/potatosalad/erlang-jose/commit/8e532095de114ef4bf88a9ec5d651f... | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | github.com | |
| github.com/potatosalad/erlang-jose/commit/3670f873c274bba86fb7f5ee5727a7... | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Peter Ullrich (en)
CNA: Andrew Bennett (en)
CNA: Jonatan Männchen / EEF (en)
Additional Advisory Data
Workarounds
CNA: Use a constant-time native X25519 implementation for private-key operations: install the libsodium or libdecaf NIF, or run on an OTP release whose crypto application provides x25519, and do not force the pure-Erlang Curve25519 fallback (JOSE.crypto_fallback(true) or JOSE.curve25519_module(:jose_jwa_curve25519)) for long-lived keys.