CVE-2025-53864

5.8 MEDIUM

📋 TL;DR

This vulnerability allows remote attackers to cause denial of service in Connect2id Nimbus JOSE + JWT libraries by sending JWTs with deeply nested JSON objects, triggering uncontrolled recursion and StackOverflowError. It affects applications using vulnerable versions of these libraries for JWT processing. The issue is independent of underlying JSON parser limitations.

💻 Affected Systems

Products:
  • Connect2id Nimbus JOSE + JWT
Versions: 10.0.x before 10.0.2 and 9.37.x before 9.37.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any application using these library versions for JWT processing, regardless of underlying JSON parser.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service unavailability due to application crashes from StackOverflowError, requiring manual restart and potentially causing extended downtime.

🟠

Likely Case

Intermittent service disruptions when malicious JWTs are processed, leading to degraded performance and potential availability issues.

🟢

If Mitigated

Minimal impact with proper input validation and depth limits in place, though some performance degradation may occur.

🌐 Internet-Facing: MEDIUM - Attackers can exploit this remotely if JWT endpoints are exposed, but requires specific payload construction.
🏢 Internal Only: LOW - Requires internal access to send malicious JWTs, reducing attack surface.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending a specially crafted JWT with deeply nested JSON structures, which is straightforward to create.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 10.0.2 or 9.37.4

Vendor Advisory: https://bitbucket.org/connect2id/nimbus-jose-jwt/commits/f7fb882cc08f027c9ceb874acec3b51c6222861c

Restart Required: Yes

Instructions:

1. Update dependency to nimbus-jose-jwt version 10.0.2 or 9.37.4. 2. Update pom.xml or build.gradle with new version. 3. Rebuild and redeploy application. 4. Restart affected services.

🔧 Temporary Workarounds

Input validation filter

all

Implement middleware to reject JWTs with excessive nesting before reaching vulnerable library

Rate limiting

all

Implement rate limiting on JWT endpoints to reduce impact of DoS attempts

🧯 If You Can't Patch

  • Implement WAF rules to block JWTs with deeply nested JSON structures
  • Monitor application logs for StackOverflowError exceptions and implement alerting

🔍 How to Verify

Check if Vulnerable:

Check project dependencies for nimbus-jose-jwt version 10.0.0-10.0.1 or 9.37.0-9.37.3

Check Version:

mvn dependency:tree | grep nimbus-jose-jwt OR gradle dependencies | grep nimbus-jose-jwt

Verify Fix Applied:

Verify nimbus-jose-jwt version is 10.0.2 or 9.37.4 in dependencies

📡 Detection & Monitoring

Log Indicators:

  • StackOverflowError in application logs
  • JWT processing failures
  • Increased error rates on authentication endpoints

Network Indicators:

  • Unusually large JWT payloads
  • Multiple authentication requests with similar payloads

SIEM Query:

source="application.logs" AND ("StackOverflowError" OR "nimbus.jose" AND "error")

🔗 References

📤 Share & Export