CVE-2026-97848
Keycloak-services: keycloak-services: protocol mapper with jsontype=json bypasses token sanitization
- Published
- Updated
- Reserved
- Assigned by
- redhat
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| NVDNVD · Awaiting Analysis | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
- EPSS (exploitation in 30 days)
- 0.25% · top 83% of all CVEs (6 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.5.
Weakness
Affected products
Red Hat · Red Hat build of Keycloak 26.4
- unaffected 26.4.17-2 – < *
Red Hat · Red Hat build of Keycloak 26.4
- unaffected 26.4-29 – < *
Red Hat · Red Hat build of Keycloak 26.4
- unaffected 26.4-30 – < *
Red Hat · Red Hat build of Keycloak 26.4.17
All versions: unaffected
Red Hat · Red Hat build of Keycloak 26.4.17
All versions: unaffected
Red Hat · Red Hat build of Keycloak 26.6
- unaffected 26.6.8-2 – < *
Red Hat · Red Hat build of Keycloak 26.6
- unaffected 26.6-24 – < *
Red Hat · Red Hat build of Keycloak 26.6
- unaffected 26.6-24 – < *
Red Hat · Red Hat build of Keycloak 26.6.8
All versions: unaffected
Red Hat · Red Hat build of Keycloak 26.6.8
All versions: unaffected
Red Hat · Red Hat Single Sign-On 7
All versions: unaffected
What to do
Workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
References (6)
- RHSA-2026:95759 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:95760 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:95761 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:95762 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2026-97848 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2540960 (opens in a new tab)issue-trackingx_refsource_REDHAT
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-97848)Record last updated .