eef-cve-2026-65628

CVSS 5.9 osv_hex
Description

## Summary `jose_jwk:shared_secret/2` (exposed in Elixir as `JOSE.JWK.shared_secret/2`) derives an ECDH shared secret from two JWKs. Its first function clause only matches when both JWKs carry the same key type (`kty`) module, and its fallback clause re-invokes itself as `shared_secret(from(YourJWK), from(MyJWK))`. Because `from/1` returns an already-parsed `jose_jwk` record unchanged, passing two JWKs whose key types differ (for example an EC key and an RSA key) makes the fallback clause re-enter with identical arguments, producing an unbounded tail-recursive loop that never returns and never crashes. An application that derives a shared secret from an externally supplied peer public key without first checking that the peer key's type and curve match its own key can be driven into this loop by an attacker-controlled JWK, pinning an Erlang scheduler at 100% CPU. Repeated requests exhaust the available schedulers, resulting in a denial of service. This issue affects jose: from 1.5.0 before 1.11.13. ## Workarounds Before calling `JOSE.JWK.shared_secret/2`, verify that the externally supplied peer key's type (`kty`) and curve match your own key, and reject any key whose type does not match before attempting derivation.

Timeline
Published
unknown
Last Modified
unknown
CVSS Details

CVSS details not available.

Affected Products

No product information available.

Weaknesses (CWE)
References
Linked Vulnerabilities

No linked vulnerabilities found.

{
  "affected": [
    {
      "database_specific": {
        "source": "https://cna.erlef.org/osv/EEF-CVE-2026-65628.json"
      },
      "package": {
        "ecosystem": "Hex",
        "name": "jose",
        "purl": "pkg:hex/jose"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.5.0"
            },
            {
              "fixed": "1.11.13"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "1.10.0",
        "1.10.1",
        "1.11.0",
        "1.11.1",
        "1.11.10",
        "1.11.11",
        "1.11.12",
        "1.11.2",
        "1.11.4",
        "1.11.5",
        "1.11.6",
        "1.11.7",
        "1.11.8",
        "1.11.9",
        "1.5.0",
        "1.5.1",
        "1.5.2",
        "1.6.0",
        "1.6.1",
        "1.7.0",
        "1.7.1",
        "1.7.2",
        "1.7.3",
        "1.7.4",
        "1.7.5",
        "1.7.6",
        "1.7.7",
        "1.7.8",
        "1.7.9",
        "1.8.0",
        "1.8.1",
        "1.8.2",
        "1.8.3",
        "1.8.4",
        "1.9.0"
      ]
    },
    {
      "database_specific": {
        "source": "https://cna.erlef.org/osv/EEF-CVE-2026-65628.json"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "7b80b9f55b9898e1a6901ce136061b241b021d7c"
            },
            {
              "fixed": "26182a7de63b91550035d3f08741f7d17f1f675a"
            }
          ],
          "repo": "https://github.com/potatosalad/erlang-jose",
          "type": "GIT"
        }
      ],
      "versions": [
        "1.11.12",
        "1.11.11",
        "1.11.10",
        "1.11.9",
        "1.11.8",
        "1.11.7",
        "1.11.5",
        "1.11.4",
        "1.11.2",
        "1.11.1",
        "1.11.0",
        "1.10.1",
        "1.10.0",
        "1.9.0",
        "1.8.4",
        "1.8.3",
        "1.8.2",
        "1.8.1",
        "1.8.0",
        "1.7.9",
        "1.7.8",
        "1.7.7",
        "1.7.6",
        "1.7.5",
        "1.7.4",
        "1.7.3",
        "1.7.2",
        "1.7.1",
        "1.7.0",
        "1.6.1",
        "1.6.0",
        "1.5.2",
        "1.5.1",
        "1.5.0"
      ]
    }
  ],
  "aliases": [
    "CVE-2026-65628",
    "GHSA-fpj2-9h59-32pp"
  ],
  "credits": [
    {
      "name": "Peter Ullrich",
      "type": "REPORTER"
    },
    {
      "name": "Andrew Bennett",
      "type": "REMEDIATION_DEVELOPER"
    },
    {
      "name": "Jonatan Männchen / EEF",
      "type": "ANALYST"
    }
  ],
  "database_specific": {
    "capec_ids": [
      "CAPEC-130"
    ],
    "cpe_ids": [
      "cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
    ],
    "cwe_ids": [
      "CWE-674"
    ]
  },
  "details": "## Summary\n\n`jose_jwk:shared_secret/2` (exposed in Elixir as `JOSE.JWK.shared_secret/2`) derives an ECDH shared secret from two JWKs. Its first function clause only matches when both JWKs carry the same key type (`kty`) module, and its fallback clause re-invokes itself as `shared_secret(from(YourJWK), from(MyJWK))`. Because `from/1` returns an already-parsed `jose_jwk` record unchanged, passing two JWKs whose key types differ (for example an EC key and an RSA key) makes the fallback clause re-enter with identical arguments, producing an unbounded tail-recursive loop that never returns and never crashes.\n\nAn application that derives a shared secret from an externally supplied peer public key without first checking that the peer key's type and curve match its own key can be driven into this loop by an attacker-controlled JWK, pinning an Erlang scheduler at 100% CPU. Repeated requests exhaust the available schedulers, resulting in a denial of service.\n\nThis issue affects jose: from 1.5.0 before 1.11.13.\n\n## Workarounds\n\nBefore calling `JOSE.JWK.shared_secret/2`, verify that the externally supplied peer key's type (`kty`) and curve match your own key, and reject any key whose type does not match before attempting derivation.",
  "id": "EEF-CVE-2026-65628",
  "modified": "2026-10-26T20:11:08.179977862Z",
  "published": "2026-10-26T19:53:27.625Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-fpj2-9h59-32pp"
    },
    {
      "type": "WEB",
      "url": "https://cna.erlef.org/cves/CVE-2026-65628.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/potatosalad/erlang-jose/commit/7b80b9f55b9898e1a6901ce136061b241b021d7c"
    },
    {
      "type": "FIX",
      "url": "https://github.com/potatosalad/erlang-jose/commit/26182a7de63b91550035d3f08741f7d17f1f675a"
    },
    {
      "type": "PACKAGE",
      "url": "https://hex.pm/packages/jose"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Infinite recursion (CPU denial-of-service) in JOSE.JWK.shared_secret/2 on mismatched key types"
}
View JSON API Download JSON