Keycloak: keycloak: privilege escalation via improper scope mapping enforcement

Summary

CVECVE-2026-9795
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-05-28 05:16:41 UTC
Updated2026-07-15 01:17:10 UTC
DescriptionA flaw was found in Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature. An administrator with limited client management permissions can exploit this vulnerability to assign any realm role, including highly privileged roles, to a client's scope mapping. This bypasses intended security controls, allowing the injected role to be projected into a user's authentication token when they access the modified client. This could lead to unauthorized privilege escalation within the Keycloak realm.

Risk And Classification

Primary CVSS: v3.1 7.3 HIGH from ADP

CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N

EPSS: 0.002920000 probability, percentile 0.211720000 (date 2026-07-16)

Problem Types: CWE-266 | CWE-266 Incorrect Privilege Assignment


VersionSourceTypeScoreSeverityVector
3.1ADPCVSS7.3HIGHCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N
3.1[email protected]Secondary7.3HIGHCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N
3.10b0ca135-0b70-47e7-9f44-1890c2a1c46cSecondary7.3HIGHCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N
3.1CNACVSS7.3HIGHCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Redhat Build Of Keycloak - All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Red Hat Red Hat Build Of Keycloak 26.4 unaffected 26.4.13-1 * rpm Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.4 unaffected 26.4-19 * rpm Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.4 unaffected 26.4-19 * rpm Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.4.13 Not specified Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.6 unaffected 26.6.4-2 * rpm Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.6 unaffected 26.6-8 * rpm Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.6 unaffected 26.6-8 * rpm Not specified
CNA Red Hat Red Hat Build Of Keycloak 26.6.4 Not specified Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.4 unaffected 26.4.13-1 * rpm Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.4 unaffected 26.4-19 * rpm Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.4 unaffected 26.4-19 * rpm Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.4.13 Not specified Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.6 unaffected 26.6.4-2 * rpm Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.6 unaffected 26.6-8 * rpm Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.6 unaffected 26.6-8 * rpm Not specified
ADP Red Hat Red Hat Build Of Keycloak 26.6.4 Not specified Not specified

References

ReferenceSourceLinkTags
access.redhat.com/errata/RHSA-2026:30084 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9795.json 0b0ca135-0b70-47e7-9f44-1890c2a1c46c security.access.redhat.com
access.redhat.com/security/cve/CVE-2026-9795 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com Mitigation, Vendor Advisory
access.redhat.com/errata/RHSA-2026:30050 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
access.redhat.com/errata/RHSA-2026:30083 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
access.redhat.com/errata/RHSA-2026:30049 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
bugzilla.redhat.com/show_bug.cgi 0b0ca135-0b70-47e7-9f44-1890c2a1c46c bugzilla.redhat.com Issue Tracking, Vendor Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Red Hat would like to thank Andrej Tomci for reporting this issue. (en)

Additional Advisory Data

SourceTimeEvent
CNA2026-05-28T03:15:51.639ZReported to Red Hat.
CNA2026-05-28T03:16:49.326ZMade public.
ADP2026-05-28T03:15:51.639ZReported to Red Hat.
ADP2026-05-28T03:16:49.326ZMade public.

Solutions

ADP: RHSA-2026:30050: Red Hat build of Keycloak 26.4

ADP: RHSA-2026:30084: Red Hat build of Keycloak 26.6

ADP: RHSA-2026:30049: Red Hat build of Keycloak 26.4.13

ADP: RHSA-2026:30083: Red Hat build of Keycloak 26.6.4

Workarounds

CNA: To mitigate this issue, disable the Fine-Grained Admin Permissions (FGAPv2) feature in Keycloak if it is not strictly required. This can typically be done by setting `adminPermissionsEnabled` to `false` in the realm configuration. Disabling FGAPv2 will prevent the exploitation of this flaw by removing the vulnerable functionality. However, this may impact administrative delegation capabilities within Keycloak. A restart or reload of the Keycloak service may be required for the changes to take effect.

ADP: To mitigate this issue, disable the Fine-Grained Admin Permissions (FGAPv2) feature in Keycloak if it is not strictly required. This can typically be done by setting `adminPermissionsEnabled` to `false` in the realm configuration. Disabling FGAPv2 will prevent the exploitation of this flaw by removing the vulnerable functionality. However, this may impact administrative delegation capabilities within Keycloak. A restart or reload of the Keycloak service may be required for the changes to take effect.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report