CVE-2026-65631 in joseinfo

Summary

by MITRE • 10/26/2026

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.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 10/26/2026

The vulnerability identified in the erlang-jose library represents a critical inefficiency in algorithmic complexity that enables unauthenticated remote denial of service attacks through CPU exhaustion. This flaw specifically impacts versions ranging from 1.7.7 up to, but not including, version 1.11.13. The core issue arises when an application processes untrusted JSON Web Keys using the public jose_jwk:from_binary/1 or jose_jwk:from_map/1 APIs, as well their Elixir counterparts JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1. These functions are designed to parse RSA keys but lack sufficient validation for key structure before initiating computationally expensive operations. When an attacker submits a crafted RSA private key that includes the modulus n, public exponent e, and private exponent d while deliberately omitting all Chinese Remainder Theorem parameters such as p, q, dp, dq, and qi, the library attempts to reconstruct these missing values rather than rejecting the malformed input immediately.

The technical flaw lies in the convert_sfm_to_crt/1 function which is invoked when CRT parameters are absent. This function attempts to recover the prime factors of the modulus by factoring it directly. Since the input integers are read straight from base64url encoded data without rigorous validation that they constitute a valid RSA key structure, an attacker can supply a modulus that is itself a large prime number or otherwise resistant to factorization. In such cases, the internal helper function convert_sfm_to_crt_find_p/6 enters into an infinite search loop performing modular exponentiation over the attacker-sized modulus on every iteration. Because there are no valid factors to find, this process never succeeds and continues until it is forcibly terminated by an internal one-second watchdog timer that kills the worker process.

The operational impact of this vulnerability is severe due to its low resource cost for the attacker relative to the high computational expense imposed on the victim. A single request consisting of only a few hundred bytes can force nearly one full second of CPU work before termination. This ratio allows an unauthenticated remote attacker to saturate every available scheduler in the Erlang VM by flooding it with such crafted requests. The result is a complete denial of service where legitimate traffic cannot be processed because all computational resources are consumed handling these malicious inputs. Notably, this attack requires no credentials, does not depend on having a valid RSA key structure from the attacker's perspective, and functions regardless of special configuration settings within the target application.

From a classification standpoint, this vulnerability aligns with CWE-400 which describes uncontrolled resource consumption leading to denial of service conditions. It also maps to ATT&CK technique T1496, Resource Hijacking, where an adversary uses computing resources in ways that degrade system performance or availability for legitimate users. The attack vector is classified as Network (ATT&CK T1190) because it exploits a remotely accessible API endpoint without requiring prior authentication. This highlights the danger of trusting input data even when processed through public-facing cryptographic libraries, especially those handling complex mathematical operations like RSA key generation and manipulation.

Mitigation strategies must focus on immediate patching and defensive coding practices. The primary remediation is to upgrade erlang-jose to version 1.11.13 or later where this logic has been corrected to prevent the inefficient factorization attempts on invalid keys. For applications unable to update immediately, implementing input validation at the application layer before passing JWK data to the library can help filter out malformed structures that lack required CRT parameters when they are expected for efficient processing. Additionally, deploying rate limiting and request size restrictions at the network perimeter or web server level can mitigate the impact of flooding attacks by reducing the volume of malicious requests reaching the vulnerable service logic. Monitoring CPU usage spikes correlated with JWK parsing endpoints may also serve as an early detection mechanism for ongoing exploitation attempts.

Responsible

EEF

Reservation

07/22/2026

Disclosure

10/26/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!