CVE-2025-53864: Nimbus jose jwt Denial of Service Vulnerability
MODERATECVE-2025-53864 is a MODERATE (CVSS 5.8) denial of service vulnerability (CWE-674: Uncontrolled Recursion) affecting Nimbus jose jwt libraries in the Maven ecosystem. The issue involves nimbus jose + jwt is vulnerable to dos attacks when processing deeply nested json. Remediation is available by upgrading affected packages to version 10.0.2, 9.37.4.
CVE-2025-53864 at a Glance
Security Impact
CVSS: 5.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L).
How to Fix CVE-2025-53864
To remediate this vulnerability, upgrade all affected Nimbus jose jwt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>10.0.2</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.37.4</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.nimbusds
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-53864, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.nimbusds
Analyze the terminal output to locate any version of Nimbus jose jwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.0.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.nimbusds command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Nimbus jose jwt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-53864 Affected Nimbus jose jwt Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.nimbusds:nimbus-jose-jwt
|
Maven |
≥ 9.38-rc1
< 10.0.2
|
10.0.2
|
|
com.nimbusds:nimbus-jose-jwt
|
Maven |
< 9.37.4
|
9.37.4
|
References
Frequently Asked Questions
What is CVE-2025-53864?
Which Nimbus jose jwt versions are affected?
What version fixes CVE-2025-53864?
Is nimbus-jose-jwt affected?
What is the CVSS score of CVE-2025-53864?
What CWE is associated with CVE-2025-53864?
How can I check Maven dependencies for CVE-2025-53864?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xwmg-2g98-w7v9",
"modified" : "2025-09-19T21:31:45Z",
"published" : "2025-07-11T03:30:34Z",
"aliases" : [ "CVE-2025-53864" ],
"summary" : "Nimbus JOSE + JWT is vulnerable to DoS attacks when processing deeply nested JSON",
"details" : "Connect2id Nimbus JOSE + JWT before 10.0.2 allows a remote attacker to cause a denial of service via a deeply nested JSON object supplied in a JWT claim set, because of uncontrolled recursion. NOTE: this is independent of the Gson 2.11.0 issue because the Connect2id product could have checked the JSON object nesting depth, regardless of what limits (if any) were imposed by Gson.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.nimbusds:nimbus-jose-jwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.38-rc1"
}, {
"fixed" : "10.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.nimbusds:nimbus-jose-jwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.37.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53864"
}, {
"type" : "WEB",
"url" : "https://github.com/google/gson/commit/1039427ff0100293dd3cf967a53a55282c0fef6b"
}, {
"type" : "PACKAGE",
"url" : "https://bitbucket.org/connect2id/nimbus-jose-jwt"
}, {
"type" : "WEB",
"url" : "https://bitbucket.org/connect2id/nimbus-jose-jwt/commits/f7fb882cc08f027c9ceb874acec3b51c6222861c"
}, {
"type" : "WEB",
"url" : "https://bitbucket.org/connect2id/nimbus-jose-jwt/issues/583/stackoverflowerror-due-to-deeply-nested"
}, {
"type" : "WEB",
"url" : "https://bitbucket.org/connect2id/nimbus-jose-jwt/issues/593/back-port-cve-2025-53864-fix-to-9x-branch"
}, {
"type" : "WEB",
"url" : "https://github.com/google/gson/compare/gson-parent-2.11.0...gson-parent-2.12.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-11T16:43:40Z",
"nvd_published_at" : "2025-07-11T03:16:03Z"
}
}