Skip to content

EEF-CVE-2026-65628 CVE-2026-65628 GHSA-fpj2-9h59-32pp

Infinite recursion (CPU denial-of-service) in JOSE.JWK.shared_secret/2 on mismatched key types

Not rated yet Hex
Severity
0.0 / 10
Unknown · CVSS 4.0
Exploit chance (EPSS)
0.14%
Chance of exploitation in the next 30 days. Higher than 3.03% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-674 Uncontrolled Recursion
Fix
1.11.13
Upgrade jose to this version or later

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.

Affected versions

Hex

PackageVulnerableFixed in
jose
>= 1.5.0, < 1.11.13
1.11.13

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

jose Hex → 1.11.13

mix
{:jose, "~> 1.11.13"} # then: mix deps.update jose

Severity breakdown

CVSS 4.0 0.0

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

Attack vector
Local
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

Weakness

CWE-674: Uncontrolled Recursion

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

How to prevent it
  • Implementation: Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
  • Implementation: Increase the stack size.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-65630
Timing side-channel in pure-Erlang X25519 scalar multiplication leaks the private key in jose
Not rated yet Also affects jose
EEF-CVE-2026-65632
ECDSA signature length is not validated in jose, allowing signature malleability
Not rated yet Also affects jose
EEF-CVE-2026-65631
erlang-jose RSA JWK parsing attempts to factor an attacker-controlled modulus, enabling CPU-exhaustion denial of service
Not rated yet Also affects jose
EEF-CVE-2026-65629
Weak PBKDF2 parameters for password-encrypted private-key export in jose
Not rated yet Also affects jose
EEF-CVE-2026-65627
Decompression bomb via unbounded zlib:inflate in jose_jwe_zip:uncompress/2
Not rated yet Also affects jose
EEF-CVE-2026-65626
Bleichenbacher padding oracle in RSAES-PKCS1-v1_5 decryption in jose
Not rated yet Also affects jose
EEF-CVE-2026-65625
Attacker-controlled AES-GCM authentication tag length allows tag forgery in jose
Not rated yet Also affects jose
GHSA-9mg4-v392-8j68
erlang-jose vulnerable to denial of service via large p2c value
Medium Also affects jose

Credits: Andrew Bennett, Jonatan Männchen / EEF, Peter Ullrich

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor