Org.keycloak/keycloak-services: jwt token cache exhaustion leading to denial of service (dos) in keycloak (keycloak)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.70 % · percentile 53 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- redhat
- NVD status
- Deferred
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.
Weaknesses (CWE)
- CWE-770 — Allocation of Resources Without Limits or Throttling
References
- https://access.redhat.com/errata/RHSA-2025:4335
- https://access.redhat.com/errata/RHSA-2025:4336
- https://access.redhat.com/security/cve/CVE-2025-2559
- https://bugzilla.redhat.com/show_bug.cgi?id=2353868
- https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca
- https://github.com/keycloak/keycloak/issues/38576
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 4.9 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H | redhat |
| CVSS 3.1 | MEDIUM 4.9 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H | NVD · secalert@redhat.com (Secondary) |
Advisories
- GHSA-2935-2wfm-hhpv — Keycloak Denial of Service (DoS) Vulnerability via JWT Token Cache
European references
- ENISA EUVD · EUVD-2025-8064
- GCVE · GCVE-0-2025-2559
Affected products
| Product | Versions |
|---|---|
| keycloak | affected 23.0.0 < 26.0.11 ; affected 26.1.0 < 26.1.5 |
| Red Hat · Red Hat Build of Keycloak | |
| Red Hat · Red Hat build of Keycloak 26.0 | unaffected 26.0.11-2 < * |
| Red Hat · Red Hat build of Keycloak 26.0 | unaffected 26.0-12 < * |
| Red Hat · Red Hat build of Keycloak 26.0 | unaffected 26.0-13 < * |
| Red Hat · Red Hat Single Sign-On 7 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |