CVE-2026-65631

erlang-jose RSA JWK parsing attempts to factor an attacker-controlled modulus, enabling CPU-exhaustion denial of service

Published Oct 26, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
Inefficient Algorithmic Complexity in erlang-jose allows an unauthenticated remote attacker to cause a CPU-exhaustion denial of service by submitting a crafted RSA JSON Web Key.

When an application parses an untrusted JWK through the public jose_jwk:from_binary/1 or jose_jwk:from_map/1 API (or the Elixir wrappers JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1), an RSA private key that supplies d, e, and n but omits all Chinese Remainder Theorem parameters (p, q, dp, dq, qi) is routed into convert_sfm_to_crt/1, which tries to recover the missing primes by factoring the modulus. The three integers are read straight from the base64url input and are never validated as a real RSA key. When the modulus cannot be split into two factors (for example, when it is itself prime), the search loop convert_sfm_to_crt_find_p/6 performs a modular exponentiation over the attacker-sized modulus on every iteration and never succeeds. A single request of a few hundred bytes forces close to one CPU-second of work before an internal one-second watchdog kills the worker, and a larger modulus raises the cost further. By flooding such requests an attacker can saturate every scheduler and deny service, without credentials, a valid RSA key, or any special configuration.

This issue affects jose: from 1.7.7 before 1.11.13.

Analysis

AI-generated

Technical impact

The erlang‑jose library contains a path in the RSA JSON Web Key (JWK) parsing routine that, when a key presents the public exponent e, prime modulus n, and private exponent d but omits the Chinese Remainder Theorem parameters (p, q, dp, dq, qi), attempts to recover the missing primes by factoring n. The routine reads the three integers directly from the base64url payload without validation. When the modulus cannot be factored—such as when it is itself prime—the conversion function enters a loop that repeatedly performs modular exponentiation over the entire nonce, consuming exponential CPU time. A single crafted request can require nearly one second of CPU cycles, and larger moduli increase the cost. The net effect is a CPU‑exhaustion denial of service that can be triggered by unauthenticated remote callers.

Affected Systems

This flaw affects the potatosalad jose library in all released versions from 1.7.7 up to, but not including, 1.11.13. The vulnerability is present whenever the APIs jose_jwk:from_binary/1 or jose_jwk:from_map/1 (and the Elixir wrappers JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1) parse a JWK that lacks CRT parameters. Any application that loads user‑supplied RSA JWKs via these functions in the vulnerable range of the library is susceptible.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity. Because the attack is unauthenticated and relies only on crafting an RSA JWK, an external adversary can trigger the flaw by sending a handful of requests over the network to any component that invokes the affected parsing functions. This path has a low barrier to exploitation; the presence of the vulnerability is evident once the library is in use. While the EPSS score is not available, the lack of authentication, the ability to flood targets, and the CPU‑intensive loop suggest that widespread exploitation could occur if the issue is not mitigated. The vulnerability is not listed in CISA’s KEV catalog, but the existence of a patch in 1.11.13 indicates it should be considered promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade potatosalad jose to version 1.11.13 or later.
  • Disallow or reject JWK inputs that lack CRT parameters before invoking the parsing functions.
  • Apply rate limiting or throttle incoming JWK parsing requests to cap CPU usage and protect scheduler threads.

Generated by OpenCVE AI on October 27, 2026 at 01:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Inefficient Algorithmic Complexity in erlang-jose allows an unauthenticated remote attacker to cause a CPU-exhaustion denial of service by submitting a crafted RSA JSON Web Key. When an application parses an untrusted JWK through the public jose_jwk:from_binary/1 or jose_jwk:from_map/1 API (or the Elixir wrappers JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1), an RSA private key that supplies d, e, and n but omits all Chinese Remainder Theorem parameters (p, q, dp, dq, qi) is routed into convert_sfm_to_crt/1, which tries to recover the missing primes by factoring the modulus. The three integers are read straight from the base64url input and are never validated as a real RSA key. When the modulus cannot be split into two factors (for example, when it is itself prime), the search loop convert_sfm_to_crt_find_p/6 performs a modular exponentiation over the attacker-sized modulus on every iteration and never succeeds. A single request of a few hundred bytes forces close to one CPU-second of work before an internal one-second watchdog kills the worker, and a larger modulus raises the cost further. By flooding such requests an attacker can saturate every scheduler and deny service, without credentials, a valid RSA key, or any special configuration. This issue affects jose: from 1.7.7 before 1.11.13.
Title erlang-jose RSA JWK parsing attempts to factor an attacker-controlled modulus, enabling CPU-exhaustion denial of service
First Time appeared Potatosalad
Potatosalad jose
Weaknesses CWE-407
CPEs cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*
Vendors & Products Potatosalad
Potatosalad jose
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 3, 2026, 5:31 PM
Reserved
Jul 22, 2026, 1:58 PM
Status
Deferred
Published
Oct 26, 2026, 8:17 PM
Modified
Nov 3, 2026, 6:18 PM