CVE-2025-53864:
Nimbus JOSE + JWT is vulnerable to DoS attacks when processing deeply nested JSON
5.8
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
com.nimbusds:nimbus-jose-jwt | maven | < 10.0.2 | 10.0.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the parsing of deeply nested JSON objects within a JWT claim set, leading to a denial of service due to uncontrolled recursion. While the original source code for the patch was not directly accessible, the analysis of a similar vulnerability in the google/gson
library, which is used by nimbus-jose-jwt
, provided strong evidence for the nature of the vulnerability and the likely fix. The gson
patch introduced a nesting limit to its JsonReader
to prevent StackOverflowError
. The vulnerability description for nimbus-jose-jwt
explicitly states that the issue is independent of the gson
issue, implying that nimbus-jose-jwt
had its own responsibility to validate the nesting depth. The most logical place for this vulnerability to exist is in the code responsible for parsing the JWT claims. In the nimbus-jose-jwt
library, this is handled by the com.nimbusds.jwt.JWTClaimsSet.parse
method. An attacker could craft a JWT with a deeply nested JSON in the claims, which, when parsed by the vulnerable parse
method, would lead to excessive recursion and a stack overflow, thus causing a denial of service. The confidence in this finding is medium, as it is based on strong inference from the vulnerability description and analysis of a related patch, rather than direct observation of the source code.