CVE-2025-2559
JSON

4.9medium

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

Severity
4.9medium CVSS:3.1 by redhat
Exploit likelihood
1.19% (higher than 68% of CVEs)
Published
Last changed
Assigned by
redhat
Also known as
GHSA-2935-2wfm-hhpv

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

Product or packageVersionsReported by
keycloakfrom 23.0.0 before 26.0.11, from 26.1.0 before 26.1.5CVE List
keycloak-servicesNot specifiedCVE List
rhbk/keycloak-operator-bundleNot specified
Not affected: from 26.0.11-2 before *
CVE List
rhbk/keycloak-rhel9Not specified
Not affected: from 26.0-12 before *
CVE List
rhbk/keycloak-rhel9-operatorNot specified
Not affected: from 26.0-13 before *
CVE List
org.keycloak:keycloak-services (Maven)up to 26.1.4GitHub Advisory Database

All scores

redhat4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
GitHub4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-770

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Se detectó una falla en Keycloak. Cuando la configuración utiliza tokens JWT para la autenticación, estos se almacenan en caché hasta su vencimiento. Si un cliente utiliza tokens JWT con un tiempo de vencimiento demasiado largo, por ejemplo, 24 o 48 horas, la caché puede crecer indefinidamente, lo que genera un error de memoria (OutOfMemoryError). Este problema podría generar una condición de denegación de servicio, impidiendo que los usuarios legítimos accedan al sistema.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-2559 changed 2026-09-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-2935-2wfm-hhpv changed 2025-04-30CC-BY-4.0
NVDCVE-2025-2559 changed 2026-09-21Public domain