← Back to CVE Explorer

CVE-2026-65630

Full vulnerability record from the local CVENow database.

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.

Severity
MEDIUM
CVSS score
5.9 (v4.0)
Vulnerability status
Received
Source identifier
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Published
2026-10-26 20:17:58.780000
Last modified
2026-10-26 20:17:58.780000
View original CVE JSON
{
  "id": "CVE-2026-65630",
  "sourceIdentifier": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
  "published": "2026-10-26T20:17:58.780",
  "lastModified": "2026-10-26T20:17:58.780",
  "vulnStatus": "Received",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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.\n\nThe 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.\n\nThis 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.\n\nThis issue affects jose: from 1.10.0 before 1.11.13."
    }
  ],
  "affected": [
    {
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "affectedData": [
        {
          "vendor": "potatosalad",
          "product": "jose",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.hex.pm",
          "packageName": "jose",
          "cpes": [
            "cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "jose_jwa_x25519",
            "jose_jwa_curve25519",
            "jose_curve25519_fallback",
            "jose_jwk_kty_okp_x25519"
          ],
          "programFiles": [
            "src/jwa/jose_jwa_x25519.erl",
            "src/jwa/jose_jwa_curve25519.erl",
            "src/jwa/curve25519/jose_curve25519_fallback.erl",
            "src/jwk/jose_jwk_kty_okp_x25519.erl"
          ],
          "programRoutines": [
            {
              "name": "jose_jwa_x25519:curve25519/2"
            },
            {
              "name": "jose_jwa_x25519:scalarmult/2"
            },
            {
              "name": "jose_jwa_x25519:scalarmult_base/1"
            },
            {
              "name": "jose_jwa_x25519:x25519/2"
            },
            {
              "name": "jose_jwa_x25519:x25519_base/1"
            },
            {
              "name": "jose_jwa_x25519:sk_to_pk/1"
            },
            {
              "name": "jose_jwa_x25519:montgomery_add/3"
            },
            {
              "name": "jose_jwa_x25519:montgomery_double/1"
            },
            {
              "name": "jose_jwa_curve25519:x25519_shared_secret/2"
            },
            {
              "name": "jose_jwa_curve25519:x25519_secret_to_public/1"
            }
          ],
          "repo": "https://github.com/potatosalad/erlang-jose",
          "packageURL": "pkg:hex/jose",
          "versions": [
            {
              "version": "1.10.0",
              "lessThan": "1.11.13",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "potatosalad",
          "product": "jose",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com",
          "packageName": "potatosalad/erlang-jose",
          "cpes": [
            "cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "jose_jwa_x25519",
            "jose_jwa_curve25519",
            "jose_curve25519_fallback",
            "jose_jwk_kty_okp_x25519"
          ],
          "programFiles": [
            "src/jwa/jose_jwa_x25519.erl",
            "src/jwa/jose_jwa_curve25519.erl",
            "src/jwa/curve25519/jose_curve25519_fallback.erl",
            "src/jwk/jose_jwk_kty_okp_x25519.erl"
          ],
          "programRoutines": [
            {
              "name": "jose_jwa_x25519:curve25519/2"
            },
            {
              "name": "jose_jwa_x25519:scalarmult/2"
            },
            {
              "name": "jose_jwa_x25519:scalarmult_base/1"
            },
            {
              "name": "jose_jwa_x25519:x25519/2"
            },
            {
              "name": "jose_jwa_x25519:x25519_base/1"
            },
            {
              "name": "jose_jwa_x25519:sk_to_pk/1"
            },
            {
              "name": "jose_jwa_x25519:montgomery_add/3"
            },
            {
              "name": "jose_jwa_x25519:montgomery_double/1"
            },
            {
              "name": "jose_jwa_curve25519:x25519_shared_secret/2"
            },
            {
              "name": "jose_jwa_curve25519:x25519_secret_to_public/1"
            }
          ],
          "repo": "https://github.com/potatosalad/erlang-jose",
          "packageURL": "pkg:github/potatosalad/erlang-jose",
          "versions": [
            {
              "version": "8e532095de114ef4bf88a9ec5d651fa251a972b3",
              "lessThan": "3670f873c274bba86fb7f5ee5727a7efa1322b79",
              "versionType": "git",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV40": [
      {
        "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "type": "Secondary",
        "cvssData": {
          "version": "4.0",
          "vectorString": "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",
          "baseScore": 5.9,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "HIGH",
          "attackRequirements": "PRESENT",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "vulnConfidentialityImpact": "HIGH",
          "vulnIntegrityImpact": "NONE",
          "vulnAvailabilityImpact": "NONE",
          "subConfidentialityImpact": "NONE",
          "subIntegrityImpact": "NONE",
          "subAvailabilityImpact": "NONE",
          "exploitMaturity": "NOT_DEFINED",
          "confidentialityRequirement": "NOT_DEFINED",
          "integrityRequirement": "NOT_DEFINED",
          "availabilityRequirement": "NOT_DEFINED",
          "modifiedAttackVector": "NOT_DEFINED",
          "modifiedAttackComplexity": "NOT_DEFINED",
          "modifiedAttackRequirements": "NOT_DEFINED",
          "modifiedPrivilegesRequired": "NOT_DEFINED",
          "modifiedUserInteraction": "NOT_DEFINED",
          "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
          "modifiedVulnIntegrityImpact": "NOT_DEFINED",
          "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
          "modifiedSubConfidentialityImpact": "NOT_DEFINED",
          "modifiedSubIntegrityImpact": "NOT_DEFINED",
          "modifiedSubAvailabilityImpact": "NOT_DEFINED",
          "Safety": "NOT_DEFINED",
          "Automatable": "NOT_DEFINED",
          "Recovery": "NOT_DEFINED",
          "valueDensity": "NOT_DEFINED",
          "vulnerabilityResponseEffort": "NOT_DEFINED",
          "providerUrgency": "NOT_DEFINED"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-208"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://cna.erlef.org/cves/CVE-2026-65630.html",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://github.com/potatosalad/erlang-jose/commit/3670f873c274bba86fb7f5ee5727a7efa1322b79",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://github.com/potatosalad/erlang-jose/commit/8e532095de114ef4bf88a9ec5d651fa251a972b3",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-xvr2-gggj-h2pp",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    },
    {
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-65630",
      "source": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db"
    }
  ]
}