CVE-2025-2559Org.keycloak/keycloak-services: jwt token cache exhaustion leading to denial of service…
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.
What to do
Maven has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | org.keycloak:keycloak-services | Fix pending | GHSA-2935-2wfm-hhpv |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- keycloak: affected: 23.0.0 to before 26.0.11, 26.1.0 to before 26.1.5; fixed in
26.0.11,26.1.5 - Red Hat Build of Keycloak
- Red Hat build of Keycloak 26.0
- Red Hat Single Sign-On 7
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2025:4335 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2025:4336 (vendor-advisory)
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.