# CVE-2026-65628: jose Elixir/Erlang infinite loop in ECDH shared secret derivation

Source: https://junglewise.ai/threats/cve-2026-65628-jose-jwk-shared-secret-2-exposed-in-elixir-as-jose-jwk-shared  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-26. Updated: 2026-10-26  
License: CC BY 4.0 with a link back

CVE-2026-65628 · Severity: info · Published 2026-10-26

The jose library, used for JSON Web Token (JWT) and cryptographic key handling, contains a flaw in its ECDH shared secret derivation function that can cause an infinite loop. An attacker can exploit this by providing a malicious JWK with a mismatched key type, causing an Erlang scheduler to loop indefinitely at 100% CPU. Repeated exploitation exhausts available schedulers, leading to a denial of service that makes the application unresponsive.

Vendors: [Erlang](https://junglewise.ai/threats/vendors/erlang).

## Quick answers

**Is CVE-2026-65628 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-65628 being exploited in the wild.

**How severe is CVE-2026-65628?** Informational severity, published 26 October 2026.

**Which products and versions are affected?** Erlang Jose 1.5.0 to 1.11.12.

**Is there a fix for CVE-2026-65628?** Yes: fixed in 1.11.13. Until then: Applications should validate that peer-supplied JWKs have matching key types and elliptic curve parameters before invoking shared_secret/2, either by explicit type checking or by rejecting keys that differ from the expected algorithm.</anigation>
</invoke> Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-65628 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-65628?** Check whether you run Erlang Jose at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 1.11.13

Applications should validate that peer-supplied JWKs have matching key types and elliptic curve parameters before invoking shared_secret/2, either by explicit type checking or by rejecting keys that differ from the expected algorithm.</anigation>
</invoke>

## Technical details

The shared_secret/2 function in jose_jwk fails to validate that both input JWKs have matching key types before attempting derivation. When key types differ, the fallback clause recursively reinvokes itself with identical arguments, creating an unbounded tail-recursive loop. An attacker-controlled peer public key of a different type (e.g., RSA instead of EC) triggers the loop, consuming CPU resources without recovery or exception.

## Affected products

- Erlang jose 1.5.0 to 1.11.12

## Timeline

- 2026-10-26: disclosed
- 2026-10-26: advisory

## References

- [https://repo.hex.pm/](https://repo.hex.pm/)
- [https://github.com/](https://github.com/)

## Related threats

- [erlang-jose RSA modulus factorization denial of service](https://junglewise.ai/threats/cve-2026-65631-inefficient-algorithmic-complexity-in-erlang-jose-allows-an)
