Bug 2540960 (CVE-2026-97848) - CVE-2026-97848 keycloak-services: keycloak-services: Protocol mapper with jsonType=JSON bypasses token sanitization
Summary: CVE-2026-97848 keycloak-services: keycloak-services: Protocol mapper with jso...
Keywords:
Status: NEW
Alias: CVE-2026-97848
Deadline: 2026-11-23
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-25 06:25 UTC by OSIDB Bzimport
Modified: 2026-11-05 15:03 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-09-25 06:25:05 UTC
A flaw was found in Keycloaks token sanitization mechanism, which was originally implemented to prevent role forgery. The sanitizer responsible for removing unauthorized resource access claims from tokens only performs a type check for java.util.Map. When a protocol mapper is configured with jsonType=JSON, the resulting value is a Jackson ObjectNode, which bypasses this specific type check.
An attacker with client registration privileges or a valid Initial Access Token can exploit this by registering a client with a protocol mapper targeting the resource access claim. By setting the mapper to use the JSON type, the attacker can inject arbitrary client roles into the issued tokens. Successful exploitation allows an attacker to forge administrative roles, which are then accepted by resource servers or relying parties that perform authorization based on the resource access claim.


Note You need to log in before you can comment on or make changes to this bug.