Vulnerability · Published Mar 25, 2025 · Assigned by redhat

CVE-2025-2559Org.keycloak/keycloak-services: jwt token cache exhaustion leading to denial of service (dos) in keycloak

Medium 4.9

In plain English

A medium-severity resource allocation without limits in keycloak. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities).

Severity (CVSS 3.1)4.9Medium
Exploit odds (30 days)0.7%top 46.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

A flaw was found in Keycloak. When the configuration uses JWT tokens for authentication, the tokens are cached until expiration. If a client uses JWT tokens with an excessively long expiration time, for example, 24 or 48 hours, the cache can grow indefinitely, leading to an OutOfMemoryError. This issue could result in a denial of service condition, preventing legitimate users from accessing the system.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Mavenorg.keycloak:keycloak-servicesno fix listedGHSA-2935-2wfm-hhpv

Affected products (as reported)

VendorProductVersions
keycloak 23.0.0 – before 26.0.1126.1.0 – before 26.1.5
Red Hat Red Hat Build of Keycloak see references
Red Hat Red Hat build of Keycloak 26.0 see references
Red Hat Red Hat build of Keycloak 26.0 see references
Red Hat Red Hat build of Keycloak 26.0 see references
Red Hat Red Hat Single Sign-On 7 see references

Weakness: CWE-770 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

References