CVE-2025-2559

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

State
Published
Severity
4.9 Medium
Published
Mar 25, 2025
Updated
Sep 21, 2026
Reserved
Mar 20, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.14.9 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:Hredhat

Weaknesses

  • CWE-770 Allocation of Resources Without Limits or Throttling

Affected Products

ProductVersions
keycloak
  • 23.0.0 to before 26.0.11Affected
  • 26.1.0 to before 26.1.5Affected
Red Hat Build of KeycloakRed Hat
    Red Hat build of Keycloak 26.0Red Hat
    • 26.0.11-2 and laterNot affected
    Red Hat build of Keycloak 26.0Red Hat
    • 26.0-12 and laterNot affected
    Red Hat build of Keycloak 26.0Red Hat
    • 26.0-13 and laterNot affected
    Red Hat Single Sign-On 7Red Hat

      References

      Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.