CVE-2026-97848
A flaw was found in the token sanitization logic of Keycloak, an open source identity and access management solution.
Impact
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.
An attacker can exploit this over the network, with a regular user account, without any action by a user. If it succeeds: high risk of data or systems being changed.
Affected products · Red Hat
| Product | Affected versions |
|---|---|
| Red Hat build of Keycloak 26.4 | Versions patch: 26.4-30, patch: 26.4.17-2, patch: 26.4-29 |
| Red Hat build of Keycloak 26.6 | Versions patch: 26.6.8-2, patch: 26.6-24 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://access.redhat.com/errata/RHSA-2026:95759
- https://access.redhat.com/errata/RHSA-2026:95760
- https://access.redhat.com/errata/RHSA-2026:95761
- https://access.redhat.com/errata/RHSA-2026:95762
- https://access.redhat.com/security/cve/CVE-2026-97848
- https://bugzilla.redhat.com/show_bug.cgi?id=2540960