Technical impact
The vulnerability lies in the JOSE.JWK.shared_secret/2 function of the potatosalad jose library. It relies on a fallback clause that re‑invokes the shared_secret function when the key type (kty) differs. The fallback inadvertently causes an unbounded tail recursion when two keys of mismatched types are supplied, leading to infinite recursion. This does not crash but keeps the function running indefinitely, consuming 100% CPU on the scheduler that executes it. As a result, the application can be forced into a CPU denial‑of‑service condition.
Affected Systems
The defect exists in potatosalad jose versions 1.5.0 up to and including 1.11.12. Any application that uses the library to derive a shared secret from an externally supplied JWK without validating the key type and curve before invoking JOSE.JWK.shared_secret/2 is vulnerable. This includes web services, API endpoints, or any module that performs ECDH key agreement with third‑party keys.
Risk and Exploitability
The CVSS base score is 5.9, reflecting a medium impact. EPSS is not listed, so no publicly available probability data, but the bug can be seeded by any attacker that controls the JWK they send to the application. The lack of a KEV listing suggests no widespread documented exploits yet, but the vulnerability surfaces by sending a crafted key that mismatches the server’s key type, causing the infinite recursion to consume a scheduler thread. Consequently, repeated malicious requests can deplete scheduler resources and trigger a denial of service.