Vulnerability · Published Mar 25, 2025 · Assigned by redhat
CVE-2025-2559Org.keycloak/keycloak-services: jwt token cache exhaustion leading to denial of service (dos) in keycloak
Medium 4.9
In plain English
A medium-severity resource allocation without limits in keycloak. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities).
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.keycloak:keycloak-services | no fix listed | GHSA-2935-2wfm-hhpv |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| keycloak | 23.0.0 – before 26.0.1126.1.0 – before 26.1.5 | |
| Red Hat | Red Hat Build of Keycloak | see references |
| Red Hat | Red Hat build of Keycloak 26.0 | see references |
| Red Hat | Red Hat build of Keycloak 26.0 | see references |
| Red Hat | Red Hat build of Keycloak 26.0 | see references |
| Red Hat | Red Hat Single Sign-On 7 | see references |
Weakness: CWE-770 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
References
- RHSA-2025:4335 vendor-advisory, x_refsource_REDHAT
- RHSA-2025:4336 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2025-2559 vdb-entry, x_refsource_REDHAT
- RHBZ#2353868 issue-tracking, x_refsource_REDHAT
- https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca
- https://github.com/keycloak/keycloak/issues/38576