# CVE-2026-65630: Timing side-channel in pure-Erlang X25519 scalar multiplication leaks the private key in jose

Status: published. Published: 2026-10-26. Updated: 2026-11-02.

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.

## Remediation

- workaround: 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. (source: CNA: EEF)
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: EEF) — https://github.com/potatosalad/erlang-jose/commit/3670f873c274bba86fb7f5ee5727a7efa1322b79

## Affected products and versions

- potatosalad / jose (jose): ≥ 1.10.0; < 1.11.13 (affected, semver). Source: CNA: EEF
- potatosalad / jose (potatosalad/erlang-jose): ≥ 8e532095de114ef4bf88a9ec5d651fa251a972b3; < 3670f873c274bba86fb7f5ee5727a7efa1322b79 (affected, git). Source: CNA: EEF

## Severity and prioritization

- CVSS 4.0: 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; source: CNA: EEF

- CVSS 4.0: 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/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; source: NVD: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

- CISA KEV: No listing in collected sources

- EPSS: 0.14% as of 2026-11-02; percentile 3.07%

- SSVC: exploitation poc; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-208

## Exploit evidence

- exploit: https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp (ADP: CISA-ADP)

## References

- https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp (CNA: EEF; vendor-advisory, related)

- https://cna.erlef.org/cves/CVE-2026-65630.html (CNA: EEF; related)

- https://osv.dev/vulnerability/EEF-CVE-2026-65630 (CNA: EEF; related)

- https://github.com/potatosalad/erlang-jose/commit/8e532095de114ef4bf88a9ec5d651fa251a972b3 (CNA: EEF; related)

- https://github.com/potatosalad/erlang-jose/commit/3670f873c274bba86fb7f5ee5727a7efa1322b79 (CNA: EEF; patch)

- https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp (ADP: CISA-ADP; exploit)

- https://cna.erlef.org/cves/CVE-2026-65630.html (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/potatosalad/erlang-jose/commit/3670f873c274bba86fb7f5ee5727a7efa1322b79 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/potatosalad/erlang-jose/commit/8e532095de114ef4bf88a9ec5d651fa251a972b3 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://osv.dev/vulnerability/EEF-CVE-2026-65630 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp (134c704f-9b21-4f2e-91b3-4a467353bcc0)

## Provenance

- CNA: EEF: https://www.cve.org/CVERecord?id=CVE-2026-65630; retrieved 2026-11-02; source updated 2026-11-02

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-65630; retrieved 2026-11-03; source updated 2026-11-02

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-65630; retrieved 2026-11-02; source updated Not reported

Revision: 59196f1a9102727d7ce338b477811f28a6d8c320ac38a68a5b531072eb7d7014

Canonical: https://y2.dev/cve/CVE-2026-65630

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.