Keycloak-services: keycloak-services: protocol mapper with jsontype=json bypasses token sanitization
- State
- Published
- Severity
- 6.5 Medium
- Published
- Nov 6, 2026
- Updated
- Nov 9, 2026
- Reserved
- Sep 25, 2026
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.
| Product | Versions |
|---|---|
| Red Hat build of Keycloak 26.4 Red Hat | 26.4.17-2 and later Not Affected |
| Red Hat build of Keycloak 26.4 Red Hat | 26.4-29 and later Not Affected |
| Red Hat build of Keycloak 26.4 Red Hat | 26.4-30 and later Not Affected |
| Red Hat build of Keycloak 26.4.17 Red Hat | |
| Red Hat build of Keycloak 26.4.17 Red Hat | |
| Red Hat build of Keycloak 26.6 Red Hat | 26.6.8-2 and later Not Affected |
| Red Hat build of Keycloak 26.6 Red Hat | 26.6-24 and later Not Affected |
| Red Hat build of Keycloak 26.6 Red Hat | 26.6-24 and later Not Affected |
| Red Hat build of Keycloak 26.6.8 Red Hat | |
| Red Hat build of Keycloak 26.6.8 Red Hat | |
| Red Hat Single Sign-On 7 Red Hat |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 6.5 Medium | redhat |
Weaknesses
- CWE-20 Improper Input Validation
References
- RHSA-2026:95759Vendor Advisory
- RHSA-2026:95760Vendor Advisory
- RHSA-2026:95761Vendor Advisory
- RHSA-2026:95762Vendor Advisory
- https://access.redhat.com/security/cve/CVE-2026-97848Vulnerability Database
- RHBZ#2540960Issue Tracker
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.