{"id":"CVE-2026-97848","kind":"vulnerability","aliases":["CVE-2026-97848"],"related":[],"title":"Keycloak: token sanitizer misses JSON claims, letting forged client roles through","description":"A flaw was found in the token sanitization logic of Keycloak, an open source identity and access management solution. The issue occurs when a protocol mapper is configured to emit structured claims using the JSON type. The security check designed to remove unauthorized role mappings only looks for standard Java maps and fails to recognize Jackson based JSON objects. This allows an attacker to inject forged client roles into security tokens, which could lead to unauthorized access to protected resources.","summary":"When a Keycloak protocol mapper emits structured JSON claims, the check that strips unauthorized role mappings does not recognize Jackson JSON objects. An attacker can inject forged client roles into security tokens and reach protected resources.","severity":"medium","cvss":6.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["identity","keycloak","package","self-hosted"],"not_affected_if":["no-json-protocol-mapper"],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-11-06T06:16:45+00:00","first_seen_at":"2026-11-06T06:40:13+00:00","triaged_at":"2026-11-06T06:41:31+00:00","updated_at":"2026-11-06T06:41:31+00:00","category":"package","confidence":0.5,"triage":{"at":"2026-11-06T06:41:31Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"network","title":"Keycloak: token sanitizer misses JSON claims, letting forged client roles through","impact":"high","summary":"When a Keycloak protocol mapper emits structured JSON claims, the check that strips unauthorized role mappings does not recognize Jackson JSON objects. An attacker can inject forged client roles into security tokens and reach protected resources.","audience":"businesses","category":"package","nicknames":[],"who_cares":["keycloak","self-hosted","identity"],"confidence":0.5,"fix_status":"unknown","needs_auth":"unknown","worst_case":"Forged client roles in tokens grant access to protected resources","analyst_note":"Check the NVD entry at https://nvd.nist.gov/vuln/detail/CVE-2026-97848 for affected and fixed Keycloak versions and the required attacker privileges.","how_to_check":"unknown","plain_action":"","needs_analyst":true,"not_affected_if":["no-json-protocol-mapper"],"who_is_affected":"Organizations running Keycloak as their identity provider where a protocol mapper is configured to emit structured claims using the JSON type. Deployments that do not use such mappers are not described as affected by the sources. The sources do not name affected versions.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000665,"input_tokens":4267,"output_tokens":476,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-2026':12A,15A '-97848':13A,16A 'access':75C,135C 'allow':119C 'attack':46B,121C 'base':115C 'check':33B,97C 'claim':6A,31B,90C 'client':9A,50B,125C 'configur':86C 'could':131C 'cve':11A,14A 'design':98C 'emit':28B,88C 'fail':111C 'flaw':60C 'forg':8A,49B,124C 'found':62C 'host':22B 'ident':17B,73C 'inject':48B,123C 'issu':79C 'jackson':42B,114C 'java':108C 'json':5A,30B,43B,93C,116C 'keycloak':1A,18B,25B,69C 'lead':132C 'let':7A 'logic':67C 'look':105C 'manag':76C 'map':38B,103C,109C 'mapper':27B,84C 'miss':4A 'object':44B,117C 'occur':80C 'open':71C 'packag':19B 'protect':57B,137C 'protocol':26B,83C 'reach':56B 'recogn':41B,113C 'remov':100C 'resourc':58B,138C 'role':10A,37B,51B,102C,126C 'sanit':3A,66C 'secur':53B,96C,128C 'self':21B 'self-host':20B 'solut':77C 'sourc':72C 'standard':107C 'strip':35B 'structur':29B,89C 'token':2A,54B,65C,129C 'type':94C 'unauthor':36B,101C,134C 'use':91C","nicknames":[],"mitigations":[],"who_affected":"Organizations running Keycloak as their identity provider where a protocol mapper is configured to emit structured claims using the JSON type. Deployments that do not use such mappers are not described as affected by the sources. The sources do not name affected versions.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["identity","keycloak","medium","package","selfhosted"],"campaign_type":null,"search_a":"'-2026':12A,15A '-97848':13A,16A 'claim':6A 'client':9A 'cve':11A,14A 'forg':8A 'json':5A 'keycloak':1A 'let':7A 'miss':4A 'role':10A 'sanit':3A 'token':2A","search_b":"'attack':46B 'check':33B 'claim':31B 'client':50B 'emit':28B 'forg':49B 'host':22B 'ident':17B 'inject':48B 'jackson':42B 'json':30B,43B 'keycloak':18B,25B 'map':38B 'mapper':27B 'object':44B 'packag':19B 'protect':57B 'protocol':26B 'reach':56B 'recogn':41B 'resourc':58B 'role':37B,51B 'secur':53B 'self':21B 'self-host':20B 'strip':35B 'structur':29B 'token':54B 'unauthor':36B","search_c":"'access':75C,135C 'allow':119C 'attack':121C 'base':115C 'check':97C 'claim':90C 'client':125C 'configur':86C 'could':131C 'design':98C 'emit':88C 'fail':111C 'flaw':60C 'forg':124C 'found':62C 'ident':73C 'inject':123C 'issu':79C 'jackson':114C 'java':108C 'json':93C,116C 'keycloak':69C 'lead':132C 'logic':67C 'look':105C 'manag':76C 'map':103C,109C 'mapper':84C 'object':117C 'occur':80C 'open':71C 'protect':137C 'protocol':83C 'recogn':113C 'remov':100C 'resourc':138C 'role':102C,126C 'sanit':66C 'secur':96C,128C 'solut':77C 'sourc':72C 'standard':107C 'structur':89C 'token':65C,129C 'type':94C 'unauthor':101C,134C 'use':91C","first_public_at":"2026-11-06T06:16:45+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","cvss_by":"secalert@redhat.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-97848","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97848","severity":null,"published_at":"2026-11-06T06:16:45+00:00","modified_at":"2026-11-06T06:16:45+00:00","first_seen_at":"2026-11-06T06:40:13+00:00","fetched_at":"2026-11-06T06:40:13+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"}