{"id":"CVE-2025-2559","title":"A flaw was found in Keycloak","summary":"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…","severity":"medium","cvss":4.9,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-770"],"vendor":"Red Hat","product":"keycloak","affected":["keycloak >= 23.0.0 < 26.0.11","keycloak >= 26.1.0 < 26.1.5","keycloak-services","rhbk/keycloak-operator-bundle (all versions)","rhbk/keycloak-rhel9 (all versions)","rhbk/keycloak-rhel9-operator (all versions)","keycloak-services (all versions)"],"published":"2025-03-25","updated":"2026-09-21","sourceUpdated":"2026-09-21T06:17:00.170","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-2559","references":[{"url":"https://access.redhat.com/errata/RHSA-2025:4335","label":"secalert@redhat.com"},{"url":"https://access.redhat.com/errata/RHSA-2025:4336","label":"secalert@redhat.com"},{"url":"https://access.redhat.com/security/cve/CVE-2025-2559","label":"secalert@redhat.com"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2353868","label":"secalert@redhat.com"},{"url":"https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca","label":"secalert@redhat.com"},{"url":"https://github.com/keycloak/keycloak/issues/38576","label":"secalert@redhat.com"},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-2559.json"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-2559"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-2559"}],"tags":["nvd","cve.org","csaf","vex","red-hat"],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-31T16:31:49.361189Z"},"epss":0.00683,"epssPercentile":0.50677,"ingestedAt":"2026-09-21T06:32:37.142Z","patched":["build_of_keycloak 26.0","build_of_keycloak"],"slug":"CVE-2025-2559","body":"## Overview\n\nA 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.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Vendor advisories\n\n- **RHSA-2025:4335** · Red Hat · fixed in: Red Hat build of Keycloak 26.0 · released 2025-04-29 · [advisory](https://access.redhat.com/errata/RHSA-2025:4335)\n- **RHSA-2025:4336** · Red Hat · fixed in: Red Hat Build of Keycloak · released 2025-04-29 · [advisory](https://access.redhat.com/errata/RHSA-2025:4336)\n- **Red Hat VEX** · Moderate · affected: Red Hat Single Sign-On 7 · no fix planned: Red Hat Single Sign-On 7 · updated 2026-09-21 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-2559.json)","depth":"sunlit","depthScore":27,"depthScoreParts":{"impact":27,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}