{"id":"CVE-2026-97848","title":"Keycloak-services: keycloak-services: protocol mapper with jsontype=json bypasses token sanitization","summary":"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…","severity":"medium","cvss":6.5,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","cvssSource":"cna","cwe":["CWE-20"],"vendor":"Red Hat","product":"keycloak-rhel9-container","affected":["keycloak-rhel9-container (all versions)","keycloak-rhel9-operator-bundle-container (all versions)","keycloak-rhel9-operator-container (all versions)","keycloak-services","rhbk/keycloak-rhel9","keycloak-services"],"published":"2026-11-06","updated":"2026-11-06","sourceUpdated":"2026-11-06T10:27:54.142Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-97848","references":[{"url":"https://access.redhat.com/errata/RHSA-2026:95760","label":"RHSA-2026:95760"},{"url":"https://access.redhat.com/errata/RHSA-2026:95761","label":"RHSA-2026:95761"},{"url":"https://access.redhat.com/security/cve/CVE-2026-97848"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2540960","label":"RHBZ#2540960"}],"tags":["cve.org"],"ingestedAt":"2026-11-06T06:46:27.263Z","slug":"CVE-2026-97848","body":"## Overview\n\nA 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.\n\n## Affected\n\n- `keycloak-rhel9-container (all versions)`\n- `keycloak-rhel9-operator-bundle-container (all versions)`\n- `keycloak-rhel9-operator-container (all versions)`\n- `keycloak-services`\n- `rhbk/keycloak-rhel9`\n- `keycloak-services`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n### Workarounds\n\nMitigation 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.","depth":"sunlit","depthScore":36,"depthScoreParts":{"impact":35.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}