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.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/2xxx/CVE-2025-2559.json",
"cna_assigner": "redhat",
"cwe_ids": [
"CWE-770"
]
}[
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"99495539601978461797104946757775683432",
"136582808265309047874801596351273693980",
"147406706728040871718454698547305497979",
"325688004905325422922942534192339862550",
"203646125252265590415965187965001576457",
"233930968314448263078517150632578458400",
"87559914693719928603240101130548980776",
"40269991946593085019937622258852402612",
"32369642146548667978820170705753519917",
"297089583331427314864894634166669645187",
"65539410305777762687259700028662703215",
"16042915975709791495202969784886719431",
"137575164655374216848161791086381743061"
],
"threshold": 0.9
},
"id": "CVE-2025-2559-4ae39811",
"target": {
"file": "services/src/main/java/org/keycloak/authentication/authenticators/client/JWTClientValidator.java"
},
"source": "https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca",
"signature_version": "v1"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 877.0,
"function_hash": "46172163112779803195028627278594652112"
},
"id": "CVE-2025-2559-605ca17a",
"target": {
"function": "validateTokenReuse",
"file": "services/src/main/java/org/keycloak/authentication/authenticators/client/JWTClientValidator.java"
},
"source": "https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca",
"signature_version": "v1"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 736.0,
"function_hash": "43652828651718544592582632549301905351"
},
"id": "CVE-2025-2559-818406a3",
"target": {
"function": "validateToken",
"file": "services/src/main/java/org/keycloak/authentication/authenticators/client/JWTClientValidator.java"
},
"source": "https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca",
"signature_version": "v1"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"138873874259460242731517666077215121068",
"307061160018297316716860852342551339080",
"22563539369615669290211265648088465786"
],
"threshold": 0.9
},
"id": "CVE-2025-2559-98df06d3",
"target": {
"file": "services/src/main/java/org/keycloak/protocol/oidc/OIDCAdvancedConfigWrapper.java"
},
"source": "https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca",
"signature_version": "v1"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"207871681582131381051325541528469796774",
"232110511063997108434055783295008042299",
"201215482816556552952895325645540469170",
"314822569098284525717335466561956758374",
"324592060811291321952184208692851932791"
],
"threshold": 0.9
},
"id": "CVE-2025-2559-bba77e99",
"target": {
"file": "testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/oauth/ClientAuthSignedJWTTest.java"
},
"source": "https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca",
"signature_version": "v1"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"45562650431411920322004661027263630410",
"271191974698034486555864630435569802759",
"185524619692396922334927469650153455199",
"153765689921600403660252748523739034367"
],
"threshold": 0.9
},
"id": "CVE-2025-2559-f0bdf346",
"target": {
"file": "server-spi-private/src/main/java/org/keycloak/protocol/oidc/OIDCConfigAttributes.java"
},
"source": "https://github.com/keycloak/keycloak/commit/a10c8119d4452b866b90a9019b2cc159919276ca",
"signature_version": "v1"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-2559.json"
"2026-08-12T14:52:32Z"