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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | keycloak | 23.0.0 – < 26.0.11, 26.1.0 – < 26.1.5 | 26.0.11 |
| Red Hat | Red Hat Build of Keycloak | — | — |
| Red Hat | Red Hat build of Keycloak 26.0 | — | — |
| Red Hat | Red Hat Single Sign-On 7 | — | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.keycloak:keycloak-services | <= 26.1.4 | — | GHSA-2935-2wfm-hhpv |
Advisories 2
- WID-SEC-2025-0630 Keycloak: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Sep 29, 2025
- NCSC-2025-0141 Kwetsbaarheden verholpen in Keycloak NCSC-NL (Netherlands) · May 6, 2025
References
- RHSA-2025:4335 vendor-advisory
- RHSA-2025:4336 vendor-advisory
- https://access.redhat.com/security/cve/CVE-2025-2559 vdb-entry
- RHBZ#2353868 issue-tracking
- https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca
- https://github.com/keycloak/keycloak/issues/38576