# CVE-2026-65628: Infinite recursion (CPU denial-of-service) in JOSE.JWK.shared\_secret/2 on mismatched key types

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-26)
- **CWE:** CWE-674
- **Published:** 2026-10-26T19:53:27.625Z
- **Modified:** 2026-11-19T08:01:55.618Z

## Who should check

- Anyone running potatosalad jose \>= 1.5.0, \< 1.11.13
- Anyone running potatosalad jose \>= 7b80b9f55b9898e1a6901ce136061b241b021d7c, \< 26182a7de63b91550035d3f08741f7d17f1f675a

## Description

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.

## Affected and fixed versions

- potatosalad jose: \>= 1.5.0, \< 1.11.13 (cvelist)
- potatosalad jose: \>= 7b80b9f55b9898e1a6901ce136061b241b021d7c, \< 26182a7de63b91550035d3f08741f7d17f1f675a (cvelist)

## Mitigation

- Upgrade jose to 1.11.13 or later.
- Upgrade jose to 26182a7de63b91550035d3f08741f7d17f1f675a or later.
- Vendor workaround: 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-65628. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-65628.md
Affected: potatosalad jose >= 1.5.0, < 1.11.13; potatosalad jose >= 7b80b9f55b9898e1a6901ce136061b241b021d7c, < 26182a7de63b91550035d3f08741f7d17f1f675a
Fixed in: potatosalad jose 1.11.13, potatosalad jose 26182a7de63b91550035d3f08741f7d17f1f675a

Steps:
1. Search this machine and project for potatosalad jose: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-65628 being exploited?

There is no confirmed exploitation: CVE-2026-65628 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-65628?

Medium: CVSS 5.9 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-65628?

potatosalad jose \>= 1.5.0, \< 1.11.13; potatosalad jose \>= 7b80b9f55b9898e1a6901ce136061b241b021d7c, \< 26182a7de63b91550035d3f08741f7d17f1f675a.

### Is there a fix for CVE-2026-65628?

Yes. Fixed in potatosalad jose 1.11.13, potatosalad jose 26182a7de63b91550035d3f08741f7d17f1f675a. Upgrade jose to 1.11.13 or later. Upgrade jose to 26182a7de63b91550035d3f08741f7d17f1f675a or later. Vendor workaround: 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.

### How do I check if I'm affected by CVE-2026-65628?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-fpj2-9h59-32pp>
- patch: <https://github.com/potatosalad/erlang-jose/commit/7b80b9f55b9898e1a6901ce136061b241b021d7c>
- patch: <https://github.com/potatosalad/erlang-jose/commit/26182a7de63b91550035d3f08741f7d17f1f675a>
- other: <https://cna.erlef.org/cves/CVE-2026-65628.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-65628>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-65628>

HTML: <https://flawdb.com/CVE-2026-65628> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-65628>
