CVE-2026-137560 in jwt-libraryinfo

Summary

by MITRE • 11/26/2026

Web-token jwt-framework and jwt-library before 3.4.13, 4.0.x before 4.0.9, 4.1.x before 4.1.11, and 4.2.x before 4.2.6 contain a denial of service vulnerability in RSAKey, which accepts RSA keys with a modulus and public exponent of unbounded length. Remote attackers can supply a crafted key, such as in the jwk header of a DPoP proof, to force seconds of CPU per PS256/PS384/PS512 verification or RSA encryption, or per any RSA operation when GMP is unavailable.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/27/2026

The jwt-framework and associated jwt-library packages for PHP contain a critical denial of service vulnerability within the RSAKey implementation that affects multiple version branches including versions prior to 3.4.13, 4.0.x prior to 4.0.9, 4.1.x prior to 4.1.11, and 4.2.x prior to 4.2.6. This vulnerability stems from a fundamental flaw in how the library handles RSA key parameters during cryptographic operations. Specifically, the RSAKey class fails to enforce upper bounds on the length of the modulus and public exponent fields when processing JSON Web Key objects or similar inputs. In standard RSA implementations, these values are typically constrained by security standards such as those defined by NIST or PKCS#1, which limit key sizes to manageable lengths like 2048 or 4096 bits for practical performance and security reasons. However, the affected library allows attackers to supply keys with arbitrarily large modulus and public exponent values without validation or truncation logic.

When a remote attacker submits a crafted RSA key with an excessively large modulus through mechanisms such as the JSON Web Key header in a DPoP proof token, the cryptographic verification process enters a computationally intensive state. The library attempts to perform modular exponentiation using these unbounded integers. Without proper size constraints, this operation requires significant CPU resources and time to complete. For signature algorithms like PS256, PS384, and PS512, which rely on RSA with PKCS#1 v1.5 padding or PSS padding, the verification process can be forced to consume seconds of CPU time per request rather than milliseconds. This behavior effectively transforms a simple authentication check into a resource-intensive calculation that can exhaust server resources when triggered repeatedly by an attacker.

The impact is particularly severe in environments where the GMP extension for PHP is not available or disabled. In such cases, the library falls back to native PHP integer arithmetic which lacks the optimized big number handling capabilities of compiled C extensions like GMP. Consequently, operations involving large integers become exponentially slower as the bit length increases. An attacker can exploit this by sending multiple requests with crafted keys containing very long modulus values, leading to a sustained denial of service condition that degrades application performance for all users or potentially crashes the web server process due to resource exhaustion. This aligns with CWE-400 which describes uncontrolled resource consumption and is categorized under ATT&CK technique T1496 Resource Hijacking where attackers leverage computational complexity to disrupt availability services.

Mitigation requires immediate upgrading of the jwt-framework and jwt-library packages to their respective patched versions, specifically 3.4.13 or later for the 3.x branch, 4.0.9 or later for 4.0.x, 4.1.11 or later for 4.1.x, and 4.2.6 or later for 4.2.x. These updates introduce strict validation logic that enforces maximum key sizes consistent with industry standards before any cryptographic operations are initiated. Additionally, organizations should ensure that the GMP extension is enabled in their PHP environments to provide more efficient handling of large integers if legacy keys must be processed temporarily during migration windows. Implementing rate limiting on endpoints that accept JWT tokens can also serve as a compensating control to mitigate potential abuse while patching efforts are underway. Security teams should audit existing token validation logic to ensure no custom implementations bypass the library's internal safeguards and consider integrating automated vulnerability scanning tools into CI/CD pipelines to detect such dependency risks early in the development lifecycle.

Responsible

VulnCheck

Reservation

11/26/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00204

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!