Vulnerabilities in pkg:maven/com.nimbusds/nimbus-jose-jwt

PACKAGE
Advisory Identifier: GHSA-xwmg-2g98-w7v9
Advisory Summary

CVE-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.

6 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.nimbusds/nimbus-jose-jwt

6 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.nimbusds/nimbus-jose-jwt. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xwmg-2g98-w7v9 CVE-2025-53864 MODERATE Nimbus JOSE + JWT is vulnerable to DoS attacks when processing deeply nested JSON
GHSA-gvpg-vgmx-xg6w CVE-2023-52428 HIGH Denial of Service in Connect2id Nimbus JOSE+JWT
GHSA-jfmq-4g4m-99rh CVE-2017-12973 LOW Nimbus JOSE+JWT vulnerable to padding oracle attack
GHSA-2qp9-wg27-9pcv CVE-2017-12972 HIGH Nimbus JOSE+JWT missing overflow check
GHSA-pfv2-37f7-9m6w CVE-2017-12974 HIGH Improper Verification of Cryptographic Signature in Nimbus JOSE+JWT
GHSA-f6vf-pq8c-69m4 CVE-2019-17195 CRITICAL Improper Check for Unusual or Exceptional Conditions in Connect2id Nimbus JOSE+JWT

CVE-2025-53864 at a Glance

CVE Identifier CVE-2025-53864
GHSA Identifier GHSA-xwmg-2g98-w7v9
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-674: Uncontrolled Recursion
Affected Product Nimbus jose jwt
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

com.nimbusds:nimbus-jose-jwt fixed: 10.0.2
<dependency>
    <groupId>com.nimbusds</groupId>
    <artifactId>nimbus-jose-jwt</artifactId>
    <version>10.0.2</version>
</dependency>
com.nimbusds:nimbus-jose-jwt fixed: 9.37.4
<dependency>
    <groupId>com.nimbusds</groupId>
    <artifactId>nimbus-jose-jwt</artifactId>
    <version>9.37.4</version>
</dependency>
Verify Direct and Transitive Dependencies

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

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.

CVE-2025-53864 Affected Nimbus jose jwt Versions

2 component(s)
Fixed Versions:
10.0.29.37.4
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?
CVE-2025-53864 is a security vulnerability in Nimbus jose jwt involving Nimbus JOSE + JWT is vulnerable to DoS attacks when processing deeply nested JSON under CWE-674: Uncontrolled Recursion.
Which Nimbus jose jwt versions are affected?
Affected versions include releases prior to 10.0.2, 9.37.4 across affected packages: com.nimbusds:nimbus-jose-jwt.
What version fixes CVE-2025-53864?
Upgrading to 10.0.2, 9.37.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nimbus-jose-jwt affected?
Yes, com.nimbusds:nimbus-jose-jwt is affected in releases prior to 10.0.2, 9.37.4. Upgrade your dependency to 10.0.2, 9.37.4 or later.
What is the CVSS score of CVE-2025-53864?
CVE-2025-53864 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L.
What CWE is associated with CVE-2025-53864?
CVE-2025-53864 is classified under CWE-674: Uncontrolled Recursion (The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.).
How can I check Maven dependencies for CVE-2025-53864?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.nimbusds'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}