What’s Vulnerable › Vulnerabilities

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

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 products

How to fix

Upgrade to a fixed version: Red Hat build of Keycloak 26.4 26.0-12, 26.0-13, 26.0.11-2. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2025-2559 or the next vulnerability affects your stack