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 package | Versions | Reported by |
|---|---|---|
| keycloak | from 23.0.0 before 26.0.11, from 26.1.0 before 26.1.5 | CVE List |
| keycloak-services | Not specified | CVE List |
| rhbk/keycloak-operator-bundle | Not specified Not affected: from 26.0.11-2 before * | CVE List |
| rhbk/keycloak-rhel9 | Not specified Not affected: from 26.0-12 before * | CVE List |
| rhbk/keycloak-rhel9-operator | Not specified Not affected: from 26.0-13 before * | CVE List |
| org.keycloak:keycloak-services (Maven) | up to 26.1.4 | GitHub Advisory Database |
All scores
| redhat | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-2559 changed 2026-09-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2935-2wfm-hhpv changed 2025-04-30 | CC-BY-4.0 |
| NVD | CVE-2025-2559 changed 2026-09-21 | Public domain |