Skip to main content
DashboardThreatsMapFeedsAPI
reconnecting
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-53864: CWE-674 Uncontrolled Recursion in Connect2id Nimbus JOSE+JWT

0
Medium
VulnerabilityCVE-2025-53864cvecve-2025-53864cwe-674
Published: Fri Jul 11 2025 (07/11/2025, 00:00:00 UTC)
Source: CVE Database V5
Vendor/Project: Connect2id
Product: Nimbus JOSE+JWT

Description

Connect2id Nimbus JOSE + JWT 10.0.x before 10.0.2 and 9.37.x before 9.37.4 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.

AI-Powered Analysis

AILast updated: 09/24/2025, 00:19:03 UTC

Technical Analysis

CVE-2025-53864 is a medium severity vulnerability identified in the Connect2id Nimbus JOSE+JWT library versions 10.0.x prior to 10.0.2 and 9.37.x prior to 9.37.4. The issue arises from uncontrolled recursion when processing deeply nested JSON objects within JWT claim sets. Specifically, an attacker can craft a JSON Web Token containing a claim with a deeply nested JSON structure that triggers excessive recursive calls during parsing. This uncontrolled recursion can lead to a denial of service (DoS) condition by exhausting stack memory or CPU resources, causing the application or service using the vulnerable library to crash or become unresponsive. The vulnerability is independent of any limits imposed by the underlying Gson JSON parser (version 2.11.0), as the Connect2id product itself lacks checks on the nesting depth of JSON objects. This means that even if Gson imposes some limits, the Connect2id library does not enforce its own safeguards, allowing an attacker to exploit this flaw remotely without authentication or user interaction. The CVSS v3.1 base score is 5.8, reflecting a network attack vector with low complexity, no privileges or user interaction required, and a scope change due to potential impact on availability only (no confidentiality or integrity impact). No known exploits are currently reported in the wild, and no official patches or mitigation links were provided at the time of publication. This vulnerability falls under CWE-674 (Uncontrolled Recursion), highlighting a common programming flaw where recursive calls are not properly bounded, leading to resource exhaustion.

Potential Impact

For European organizations, the primary impact of this vulnerability is the risk of denial of service in applications or services that rely on the Connect2id Nimbus JOSE+JWT library for JWT processing. Since JWTs are widely used for authentication and authorization in web applications, APIs, and microservices, exploitation could disrupt critical identity and access management workflows. This could lead to service outages, degraded user experience, and potential operational disruptions, especially in sectors relying heavily on federated identity or OAuth/OIDC protocols. Although the vulnerability does not compromise confidentiality or integrity, the availability impact can be significant in environments where uptime and continuous access are critical, such as financial services, healthcare, government portals, and telecommunications. Additionally, denial of service attacks can be leveraged as part of larger multi-vector attacks or to distract security teams. The lack of required authentication or user interaction means that attackers can exploit this remotely and anonymously, increasing the threat surface. European organizations with public-facing services or APIs that accept JWTs generated or processed by vulnerable versions of Nimbus JOSE+JWT are at risk. The impact is heightened in environments with high transaction volumes or where JWT validation is a frequent operation, as the resource exhaustion can be triggered repeatedly to amplify the denial of service effect.

Mitigation Recommendations

European organizations should take immediate steps to mitigate this vulnerability beyond generic advice. First, identify all applications and services using the Connect2id Nimbus JOSE+JWT library, focusing on versions prior to 10.0.2 and 9.37.4. Upgrade these to the latest patched versions as soon as they become available from the vendor. If patches are not yet released, implement compensating controls such as input validation to limit the depth of JSON objects within JWT claim sets before processing. This can be done by enforcing strict schema validation or using custom JSON parsers that impose nesting limits. Additionally, deploy Web Application Firewalls (WAFs) or API gateways with rules to detect and block JWTs containing suspiciously deep or complex JSON structures. Monitoring and alerting on unusual JWT payload sizes or parsing errors can help detect exploitation attempts early. Rate limiting JWT validation requests can reduce the risk of resource exhaustion from repeated attacks. Finally, conduct thorough code reviews and security testing on JWT handling components to ensure no other uncontrolled recursion or resource exhaustion vulnerabilities exist. Document and update incident response plans to include scenarios involving JWT-based denial of service attacks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2025-07-11T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68707aefa83201eaacab62a2

Added to database: 7/11/2025, 2:46:07 AM

Last enriched: 9/24/2025, 12:19:03 AM

Last updated: 10/9/2025, 1:37:30 PM

Views: 68

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats