Cloudanix VulnDB

CVE-2025-53864

Medium · 5.8

CVSS

5.8

EPSS

1.0%

Published

Jul 11, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in a common software component allows an attacker to crash an application by sending it a specially crafted data token, making the service unavailable for everyone.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability allows a remote, unauthenticated attacker to cause a denial of service. It exists in the Connect2id Nimbus JOSE + JWT library, which fails to limit the nesting depth of JSON objects within a JWT claim set. By sending a JWT containing a claim with a deeply nested JSON structure, an attacker can trigger uncontrolled recursion during parsing. This leads to a stack overflow error, which crashes the thread or process handling the request, making the service unavailable.

Why it matters to the business

An attacker can render applications that use this library for authentication or data exchange unavailable to legitimate users. This can lead to service outages, disrupting critical business operations, preventing user access to services, and potentially causing financial and reputational damage. Because the vulnerability can affect components beyond the immediately vulnerable one (as indicated by the CVSS Scope Changed metric), the impact could be widespread, especially if a central authentication service is affected.

How an attack unfolds

A remote, unauthenticated attacker identifies a service endpoint that accepts and parses JWTs using a vulnerable version of the Nimbus JOSE + JWT library. The attacker crafts a malicious JWT containing a claim with a deeply nested JSON object, such as '{"a":{"a":{"a":...}}}' repeated to a great depth. This JWT is then sent to the target application. When the vulnerable library attempts to parse the malicious token, the uncontrolled recursion in the JSON parsing logic consumes all available stack memory, triggering a stack overflow exception. This exception terminates the application thread or process, resulting in a denial of service.

How to fix it

The primary remediation is to upgrade the Connect2id Nimbus JOSE + JWT library to a patched version. For applications using the 10.0.x branch, upgrade to version 10.0.2 or later. For applications using the 9.37.x branch, upgrade to version 9.37.4 or later. If an immediate upgrade is not feasible, consider implementing a Web Application Firewall (WAF) rule to inspect and block incoming JWTs that are abnormally large or appear to have excessive nesting depth as a temporary mitigation.

How to confirm the fix worked

To validate the fix, use a software composition analysis (SCA) tool or manually inspect project dependencies (e.g., pom.xml, build.gradle) to confirm that all instances of the Nimbus JOSE + JWT library have been upgraded to version 10.0.2+ or 9.37.4+. To test the fix, you can create a proof-of-concept JWT with a deeply nested JSON claim and submit it to the application in a non-production environment. A vulnerable system will crash or throw a stack overflow error, while a patched system should handle the malicious token gracefully by rejecting it without crashing.

Typical attack path

  1. Attacker identifies a target application that uses a vulnerable version of the Nimbus JOSE + JWT library for token processing.
  2. Attacker crafts a malicious JWT containing a claim with a deeply nested JSON object.
  3. Attacker sends the malicious JWT to an application endpoint that processes JWTs (e.g., an authentication endpoint).
  4. The application's JWT parsing library enters an uncontrolled recursion while processing the nested JSON.
  5. The recursion exhausts stack memory, causing a stack overflow error that crashes the application thread or process, leading to a denial of service.

How to detect it

To detect potential exploitation attempts, monitor application logs for stack overflow errors, such as 'java.lang.StackOverflowError', particularly if the stack trace involves JWT or JSON parsing functions from the Nimbus library. Correlate these errors with incoming requests in web server or API gateway logs. A spike in application restarts or crashes, especially if associated with requests from a specific source IP to an authentication endpoint, may indicate a denial-of-service attack leveraging this vulnerability.

  • java.lang.StackOverflowError

What your security team should do

  • Use software composition analysis (SCA) tools to immediately identify all applications using the Connect2id Nimbus JOSE + JWT library and their versions.
  • Prioritize patching for internet-facing systems and critical internal services that rely on this library for authentication or session management.
  • Upgrade vulnerable instances to version 10.0.2 or 9.37.4 (or newer), depending on the current version branch.
  • If patching is delayed, evaluate the use of a WAF to filter requests with excessively large or complex JWTs as a compensating control.

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Maven com.nimbusds:nimbus-jose-jwt 0 9.37.4
Maven com.nimbusds:nimbus-jose-jwt 9.38-rc1 10.0.2
Chainguard akhq 0 0.26.0-r0
Chainguard apache-nifi 0 2.4.0-r6
Chainguard apache-nifi-compat 0 2.4.0-r6
Chainguard apache-nifi-registry 0 2.4.0-r4
Chainguard apache-nifi-registry-toolkit 0 2.4.0-r4
Chainguard apache-nifi-toolkit 0 2.4.0-r6
Chainguard apicurio-registry 0 3.0.9-r6
Chainguard apicurio-registry-nginx-config 0 3.0.9-r6
Chainguard apicurio-registry-ui 0 3.0.9-r6
Chainguard camunda-zeebe-8.6 0 8.6.21-r1
Chainguard camunda-zeebe-8.6-compat 0 8.6.21-r1
Chainguard camunda-zeebe-8.7 0 8.7.7-r1
Chainguard camunda-zeebe-8.7-compat 0 8.7.7-r1
Chainguard celeborn-0.5 0 0.5.4-r11
Chainguard celeborn-0.5-compat 0 0.5.4-r9
Chainguard celeborn-0.6 0 0.6.2-r0
Chainguard celeborn-0.6-compat 0 0.6.1-r0
Chainguard druid 0 35.0.0-r0
Chainguard druid-compat 0 34.0.0-r6
Chainguard elasticsearch-7 0 7.17.29-r2
Chainguard elasticsearch-7-bitnami 0 7.17.29-r2
Chainguard elasticsearch-7-iamguarded 0 7.17.29-r2
Chainguard flyway 0 11.16.0-r0
Chainguard hadoop-client-modules 0 3.3.6-r5
Chainguard kafka-strimzi-compat 0 0.48.0-r1
Chainguard kafka_exporter-strimzi-compat 0 0.48.0-r1
Chainguard nacos 0 3.2.0-r2
Chainguard opensearch-2 0 2.19.4-r0
Chainguard opensearch-2-alerting 0 2.19.4-r0
Chainguard opensearch-2-analysis-icu 0 2.19.4-r0
Chainguard opensearch-2-analysis-kuromoji 0 2.19.4-r0
Chainguard opensearch-2-analysis-nori 0 2.19.4-r0
Chainguard opensearch-2-analysis-phonetic 0 2.19.4-r0
Chainguard opensearch-2-analysis-smartcn 0 2.19.4-r0
Chainguard opensearch-2-analysis-stempel 0 2.19.4-r0
Chainguard opensearch-2-analysis-ukrainian 0 2.19.4-r0
Chainguard opensearch-2-anomaly-detection 0 2.19.4-r0
Chainguard opensearch-2-asynchronous-search 0 2.19.4-r0
Chainguard opensearch-2-cross-cluster-replication 0 2.19.4-r0
Chainguard opensearch-2-crypto-kms 0 2.19.4-r0
Chainguard opensearch-2-custom-codecs 0 2.19.4-r0
Chainguard opensearch-2-discovery-azure-classic 0 2.19.4-r0
Chainguard opensearch-2-discovery-ec2 0 2.19.4-r0
Chainguard opensearch-2-discovery-gce 0 2.19.4-r0
Chainguard opensearch-2-entrypoint-compat 0 2.19.4-r0
Chainguard opensearch-2-geospatial 0 2.19.4-r0
Chainguard opensearch-2-identity-shiro 0 2.19.4-r0
Chainguard opensearch-2-index-management 0 2.19.4-r0
Chainguard opensearch-2-ingest-attachment 0 2.19.4-r0
Chainguard opensearch-2-job-scheduler 0 2.19.4-r0
Chainguard opensearch-2-k-nn 0 2.19.4-r0
Chainguard opensearch-2-mapper-annotated-text 0 2.19.4-r0
Chainguard opensearch-2-mapper-murmur3 0 2.19.4-r0
Chainguard opensearch-2-mapper-size 0 2.19.4-r0
Chainguard opensearch-2-ml-commons 0 2.19.4-r0
Chainguard opensearch-2-neural-search 0 2.19.4-r0
Chainguard opensearch-2-notifications 0 2.19.4-r0
Chainguard opensearch-2-observability 0 2.19.4-r0
Chainguard opensearch-2-performance-analyzer 0 2.19.4-r0
Chainguard opensearch-2-reporting 0 2.19.4-r0
Chainguard opensearch-2-repository-azure 0 2.19.4-r0
Chainguard opensearch-2-repository-gcs 0 2.19.4-r0
Chainguard opensearch-2-repository-s3 0 2.19.4-r0
Chainguard opensearch-2-security 0 2.19.4-r0
Chainguard opensearch-2-security-analytics 0 2.19.4-r0
Chainguard opensearch-2-sql 0 2.19.4-r0
Chainguard opensearch-2-store-smb 0 2.19.4-r0
Chainguard opensearch-2-telemetry-otel 0 2.19.4-r0
Chainguard opensearch-2-transport-nio 0 2.19.4-r0
Chainguard opensearch-3 0 3.3.2-r0
Chainguard opensearch-3-alerting 0 3.3.2-r0
Chainguard opensearch-3-analysis-icu 0 3.3.2-r0
Chainguard opensearch-3-analysis-kuromoji 0 3.3.2-r0
Chainguard opensearch-3-analysis-nori 0 3.3.2-r0
Chainguard opensearch-3-analysis-phonetic 0 3.3.2-r0
Chainguard opensearch-3-analysis-smartcn 0 3.3.2-r0
Chainguard opensearch-3-analysis-stempel 0 3.3.2-r0
Chainguard opensearch-3-analysis-ukrainian 0 3.3.2-r0
Chainguard opensearch-3-anomaly-detection 0 3.3.2-r0
Chainguard opensearch-3-asynchronous-search 0 3.3.2-r0
Chainguard opensearch-3-cross-cluster-replication 0 3.3.2-r0
Chainguard opensearch-3-crypto-kms 0 3.3.2-r0
Chainguard opensearch-3-custom-codecs 0 3.3.2-r0
Chainguard opensearch-3-discovery-azure-classic 0 3.3.2-r0
Chainguard opensearch-3-discovery-ec2 0 3.3.2-r0
Chainguard opensearch-3-discovery-gce 0 3.3.2-r0
Chainguard opensearch-3-geospatial 0 3.3.2-r0
Chainguard opensearch-3-identity-shiro 0 3.3.2-r0
Chainguard opensearch-3-index-management 0 3.3.2-r0
Chainguard opensearch-3-ingest-attachment 0 3.3.2-r0
Chainguard opensearch-3-job-scheduler 0 3.3.2-r0
Chainguard opensearch-3-k-nn 0 3.3.2-r0
Chainguard opensearch-3-mapper-annotated-text 0 3.3.2-r0
Chainguard opensearch-3-mapper-murmur3 0 3.3.2-r0
Chainguard opensearch-3-mapper-size 0 3.3.2-r0
Chainguard opensearch-3-ml-commons 0 3.3.2-r0
Chainguard opensearch-3-neural-search 0 3.3.2-r0
Chainguard opensearch-3-notifications 0 3.3.2-r0
Chainguard opensearch-3-observability 0 3.3.2-r0
Chainguard opensearch-3-performance-analyzer 0 3.3.2-r0
Chainguard opensearch-3-reporting 0 3.3.2-r0
Chainguard opensearch-3-repository-azure 0 3.3.2-r0
Chainguard opensearch-3-repository-gcs 0 3.3.2-r0
Chainguard opensearch-3-repository-s3 0 3.3.2-r0
Chainguard opensearch-3-security 0 3.3.2-r0
Chainguard opensearch-3-security-analytics 0 3.3.2-r0
Chainguard opensearch-3-sql 0 3.3.2-r0
Chainguard opensearch-3-store-smb 0 3.3.2-r0
Chainguard opensearch-3-telemetry-otel 0 3.3.2-r0
Chainguard prometheus-jmx-exporter-strimzi-compat 0 0.48.0-r1
Chainguard sonarqube 0 25.10.0.114319-r0
Chainguard sonarqube-docker-compat 0 25.10.0.114319-r0
Chainguard sonarqube-scripts 0 25.10.0.114319-r0
Chainguard spark-3.5 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12 0 3.5.7-r4
Chainguard spark-3.5-scala-2.12-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.12-iamguarded-compat 0 3.5.7-r2
Chainguard spark-3.5-scala-2.13 0 3.5.7-r4
Chainguard spark-3.5-scala-2.13-compat 0 3.5.7-r2
Chainguard spark-4.0 0 4.0.1-r1
Chainguard spark-4.0-scala-2.13 0 4.0.1-r3
Chainguard spark-4.0-scala-2.13-compat 0 4.0.1-r1
Chainguard spark-4.1 0 4.1.0-r1
Chainguard spark-4.1-scala-2.13 0 4.1.0-r1
Chainguard spark-4.1-scala-2.13-compat 0 4.1.0-r1
Chainguard spark-fips-3.5 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.12 0 3.5.4-r19
Chainguard spark-fips-3.5-scala-2.12-compat 0 3.5.4-r17
Chainguard spark-fips-3.5-scala-2.13 0 3.5.4-r18
Chainguard spark-fips-3.5-scala-2.13-compat 0 3.5.4-r17
Chainguard strimzi-kafka-operator 0 0.48.0-r1
Chainguard strimzi-kafka-operator-cluster-operator 0 0.48.0-r1
Chainguard strimzi-kafka-operator-kafka-agent 0 0.48.0-r1
Chainguard strimzi-kafka-operator-kafka-base 0 0.48.0-r1
Chainguard strimzi-kafka-operator-kafka-init 0 0.48.0-r1
Chainguard strimzi-kafka-operator-kafka-thirdparty-libs 0 0.48.0-r1
Chainguard strimzi-kafka-operator-kafka-thirdparty-libs-cc 0 0.48.0-r1
Chainguard strimzi-kafka-operator-topic-operator 0 0.48.0-r1
Chainguard strimzi-kafka-operator-tracing-agent 0 0.48.0-r1
Chainguard strimzi-kafka-operator-user-operator 0 0.48.0-r1
Chainguard tez 0 0.10.5-r3
Chainguard wildfly 0 36.0.1-r6
Chainguard wildfly-openjdk-17 0 36.0.1-r6
Chainguard wildfly-openjdk-17-compat 0 36.0.1-r6
Chainguard wildfly-openjdk-21 0 36.0.1-r6
Chainguard wildfly-openjdk-21-compat 0 36.0.1-r6
Wolfi akhq 0 0.26.0-r0
Wolfi apache-nifi 0 2.4.0-r6
Wolfi apache-nifi-compat 0 2.4.0-r6
Wolfi apache-nifi-registry 0 2.4.0-r4
Wolfi apache-nifi-registry-toolkit 0 2.4.0-r4
Wolfi apache-nifi-toolkit 0 2.4.0-r6
Wolfi apicurio-registry 0 3.0.9-r6
Wolfi apicurio-registry-nginx-config 0 3.0.9-r6
Wolfi apicurio-registry-ui 0 3.0.9-r6
Wolfi celeborn-0.5 0 0.5.4-r11
Wolfi celeborn-0.5-compat 0 0.5.4-r9
Wolfi celeborn-0.6 0 0.6.2-r0
Wolfi celeborn-0.6-compat 0 0.6.1-r0
Wolfi druid 0 35.0.0-r0
Wolfi druid-compat 0 34.0.0-r6
Wolfi flyway 0 11.16.0-r0
Wolfi kafka-strimzi-compat 0 0.48.0-r1
Wolfi kafka_exporter-strimzi-compat 0 0.48.0-r1
Wolfi opensearch-2 0 2.19.4-r0
Wolfi opensearch-2-alerting 0 2.19.4-r0
Wolfi opensearch-2-analysis-icu 0 2.19.4-r0
Wolfi opensearch-2-analysis-kuromoji 0 2.19.4-r0
Wolfi opensearch-2-analysis-nori 0 2.19.4-r0
Wolfi opensearch-2-analysis-phonetic 0 2.19.4-r0
Wolfi opensearch-2-analysis-smartcn 0 2.19.4-r0
Wolfi opensearch-2-analysis-stempel 0 2.19.4-r0
Wolfi opensearch-2-analysis-ukrainian 0 2.19.4-r0
Wolfi opensearch-2-anomaly-detection 0 2.19.4-r0
Wolfi opensearch-2-asynchronous-search 0 2.19.4-r0
Wolfi opensearch-2-cross-cluster-replication 0 2.19.4-r0
Wolfi opensearch-2-crypto-kms 0 2.19.4-r0
Wolfi opensearch-2-custom-codecs 0 2.19.4-r0
Wolfi opensearch-2-discovery-azure-classic 0 2.19.4-r0
Wolfi opensearch-2-discovery-ec2 0 2.19.4-r0
Wolfi opensearch-2-discovery-gce 0 2.19.4-r0
Wolfi opensearch-2-geospatial 0 2.19.4-r0
Wolfi opensearch-2-identity-shiro 0 2.19.4-r0
Wolfi opensearch-2-index-management 0 2.19.4-r0
Wolfi opensearch-2-ingest-attachment 0 2.19.4-r0
Wolfi opensearch-2-job-scheduler 0 2.19.4-r0
Wolfi opensearch-2-k-nn 0 2.19.4-r0
Wolfi opensearch-2-mapper-annotated-text 0 2.19.4-r0
Wolfi opensearch-2-mapper-murmur3 0 2.19.4-r0
Wolfi opensearch-2-mapper-size 0 2.19.4-r0
Wolfi opensearch-2-ml-commons 0 2.19.4-r0
Wolfi opensearch-2-neural-search 0 2.19.4-r0
Wolfi opensearch-2-notifications 0 2.19.4-r0
Wolfi opensearch-2-observability 0 2.19.4-r0
Wolfi opensearch-2-performance-analyzer 0 2.19.4-r0
Wolfi opensearch-2-reporting 0 2.19.4-r0
Wolfi opensearch-2-repository-azure 0 2.19.4-r0
Wolfi opensearch-2-repository-gcs 0 2.19.4-r0

Related vulnerabilities