{"id":"CVE-2026-96447","kind":"vulnerability","aliases":["CVE-2026-96447"],"related":[],"title":"Keycloak: stale tokens can reach a recreated service account","description":"A flaw was found in the TokenManager component of Keycloak, an open-source identity and access management solution. The issue occurs during the validation of stateless access tokens when the original user ID no longer exists. Keycloak incorrectly falls back to using the username to identify the user without verifying if the identity matches the original token subject. This could allow an attacker with an old token to gain access to a newly created service account if it shares the same client ID as a previously deleted one.","summary":"Keycloak falls back to matching a user by username when the original user ID no longer exists while validating stateless access tokens. An attacker holding an old token could gain access to a newly created service account that reuses the client ID of a deleted one.","severity":"medium","cvss":4.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["keycloak","package","self-hosted","service-accounts"],"not_affected_if":["no-service-account-reuse"],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-11-06T06:16:44+00:00","first_seen_at":"2026-11-06T06:40:12+00:00","triaged_at":"2026-11-06T06:41:40+00:00","updated_at":"2026-11-06T06:41:40+00:00","category":"package","confidence":0.5,"triage":{"at":"2026-11-06T06:41:40Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"network","title":"Keycloak: stale tokens can reach a recreated service account","impact":"medium","summary":"Keycloak falls back to matching a user by username when the original user ID no longer exists while validating stateless access tokens. An attacker holding an old token could gain access to a newly created service account that reuses the client ID of a deleted one.","audience":"businesses","category":"package","nicknames":[],"who_cares":["keycloak","self-hosted","service-accounts"],"confidence":0.5,"fix_status":"unknown","needs_auth":"yes","worst_case":"attacker with old token gains access to a new service account","analyst_note":"Check the NVD entry and the Keycloak security advisory for affected and fixed versions and any configuration that changes exposure.","how_to_check":"- unknown","plain_action":"","needs_analyst":true,"not_affected_if":["no-service-account-reuse"],"who_is_affected":"Teams running Keycloak as their identity provider that use stateless access tokens and delete and recreate service accounts or clients with the same client ID. The sources do not give the affected version range, and the flaw needs an old token that was issued before the deletion.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000646,"input_tokens":4262,"output_tokens":440,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-2026':11A,14A '-96447':12A,15A 'access':44B,54B,86C,97C,140C 'account':9A,23B,60B,146C 'allow':131C 'attack':47B,133C 'back':26B,110C 'client':64B,152C 'compon':77C 'could':52B,130C 'creat':58B,144C 'cve':10A,13A 'delet':68B,157C 'exist':40B,106C 'fall':25B,109C 'flaw':71C 'found':73C 'gain':53B,139C 'hold':48B 'host':20B 'id':37B,65B,103C,153C 'ident':84C,123C 'identifi':116C 'incorrect':108C 'issu':90C 'keycloak':1A,16B,24B,79C,107C 'longer':39B,105C 'manag':87C 'match':28B,124C 'newli':57B,143C 'occur':91C 'old':50B,136C 'one':69B,158C 'open':82C 'open-sourc':81C 'origin':35B,101C,126C 'packag':17B 'previous':156C 'reach':5A 'recreat':7A 'reus':62B 'self':19B 'self-host':18B 'servic':8A,22B,59B,145C 'service-account':21B 'share':149C 'solut':88C 'sourc':83C 'stale':2A 'stateless':43B,96C 'subject':128C 'token':3A,45B,51B,98C,127C,137C 'tokenmanag':76C 'use':112C 'user':30B,36B,102C,118C 'usernam':32B,114C 'valid':42B,94C 'verifi':120C 'without':119C","nicknames":[],"mitigations":[],"who_affected":"Teams running Keycloak as their identity provider that use stateless access tokens and delete and recreate service accounts or clients with the same client ID. The sources do not give the affected version range, and the flaw needs an old token that was issued before the deletion.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["keycloak","medium","package","selfhosted","serviceaccounts"],"campaign_type":null,"search_a":"'-2026':11A,14A '-96447':12A,15A 'account':9A 'cve':10A,13A 'keycloak':1A 'reach':5A 'recreat':7A 'servic':8A 'stale':2A 'token':3A","search_b":"'access':44B,54B 'account':23B,60B 'attack':47B 'back':26B 'client':64B 'could':52B 'creat':58B 'delet':68B 'exist':40B 'fall':25B 'gain':53B 'hold':48B 'host':20B 'id':37B,65B 'keycloak':16B,24B 'longer':39B 'match':28B 'newli':57B 'old':50B 'one':69B 'origin':35B 'packag':17B 'reus':62B 'self':19B 'self-host':18B 'servic':22B,59B 'service-account':21B 'stateless':43B 'token':45B,51B 'user':30B,36B 'usernam':32B 'valid':42B","search_c":"'access':86C,97C,140C 'account':146C 'allow':131C 'attack':133C 'back':110C 'client':152C 'compon':77C 'could':130C 'creat':144C 'delet':157C 'exist':106C 'fall':109C 'flaw':71C 'found':73C 'gain':139C 'id':103C,153C 'ident':84C,123C 'identifi':116C 'incorrect':108C 'issu':90C 'keycloak':79C,107C 'longer':105C 'manag':87C 'match':124C 'newli':143C 'occur':91C 'old':136C 'one':158C 'open':82C 'open-sourc':81C 'origin':101C,126C 'previous':156C 'servic':145C 'share':149C 'solut':88C 'sourc':83C 'stateless':96C 'subject':128C 'token':98C,127C,137C 'tokenmanag':76C 'use':112C 'user':102C,118C 'usernam':114C 'valid':94C 'verifi':120C 'without':119C","first_public_at":"2026-11-06T06:16:44+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","cvss_by":"secalert@redhat.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-96447","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-96447","severity":null,"published_at":"2026-11-06T06:16:44+00:00","modified_at":"2026-11-06T06:16:45+00:00","first_seen_at":"2026-11-06T06:40:12+00:00","fetched_at":"2026-11-06T06:40:12+00:00","note":null}],"documents":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}