Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain manage-clients delegated admin credentials
-
DeliveryInitiate role assignment request targeting realm-admin
-
ExploitRace the TOCTOU window in name-based check
-
ExecutionComposite realm-admin role binding written to data store
-
ImpactVerify persistent realm-admin access survives revocation
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
|
| Exploitation Conditions | Exploitation requires an authenticated user account with the manage-clients delegated admin role assigned within the target Keycloak realm - confirmed by CVSS PR:H. This role must have been explicitly granted, meaning the attack surface is limited to deployments where manage-clients is delegated to sub-administrators rather than reserved exclusively for top-level realm admins. The TOCTOU exploitation requires the attacker to successfully time a race condition against Keycloak's name-based role check, implying some degree of timing sensitivity, though CVSS AC:L suggests this is not a high-complexity barrier once attempted. Exploitation is limited by: the requirement for a pre-existing privileged account (PR:H), the race-condition timing window (may require repeated attempts), and the fact that AV:N/UI:N means no victim interaction or physical access is needed once the account is in hand. No special network position (e.g., same subnet, on-path) is required. |
| Impact | The CVSS base score of 6.5 with vector AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N reflects high confidentiality and integrity impact tempered significantly by the PR:H prerequisite - only an already-privileged administrator can trigger this. This is not a remote unauthenticated exploit. Real-world risk is moderate-to-high in multi-tenant or large enterprise Keycloak deployments where the manage-clients role is delegated to sub-administrators or less-trusted operators, as it provides a clear lateral escalation path to full realm control. EPSS data was not provided, and the CVE is not listed in CISA KEV, suggesting no confirmed widespread active exploitation. The most concerning signal is persistence: the attack survives both permission revocation and reboot, meaning standard incident response steps (revoke the account, restart the service) are insufficient to undo the compromise. There is no stated conflict between CVSS signals and the description - PR:H accurately reflects the manage-clients role requirement. |
| Exploit ScenarioDerived | An attacker who legitimately holds the manage-clients delegated administrator role in a Keycloak realm - such as a developer or support staff with scoped admin access - crafts a timing-based attack against the name-based role check to assign themselves the realm-admin composite role during the TOCTOU window. Once the escalation is committed to the realm data store, the attacker gains full administrative control over all users, clients, and configurations within the realm. Even if the security team discovers the breach and revokes the original manage-clients role, the realm-admin composite binding persists, giving the attacker continued covert access. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 28, 2026
Privilege escalation in Red Hat Build of Keycloak allows an authenticated administrator holding the manage-clients role to exploit a Time-of-check to time-of-use (TOCTOU) race condition in name-based admin role checks, elevating their privileges to realm-admin for all users within the realm. The resulting composite role relationship is persistent - it survives both manual revocation of the attacker's original permissions and system reboots, making remediation non-trivial post-exploitation. No public exploit code has been identified at time of analysis, and this CVE is not listed in the CISA KEV catalog.
RemediationAI
No specific patched version was confirmed from the available input data. The Red Hat security advisory at https://access.redhat.com/security/cve/CVE-2026-9796 and Bugzilla ticket https://bugzilla.redhat.com/show_bug.cgi?id=2482464 should be monitored for patch releases - apply any vendor-released update as the primary remediation. As an interim compensating control, revoke the manage-clients role from all non-essential administrators and enforce strict least-privilege assignment; this eliminates the attack surface for most threat actors. Audit current realm-admin composite role assignments to detect if any accounts have already been escalated - note that revocation alone will not undo a successful exploit, so affected realms may require manual removal of the persistent composite role binding at the data layer. Deployers should also consider enabling Keycloak admin audit logging and alerting on unexpected composite role changes as a detection mechanism.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in maven
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Keycloak (CPE: cpe:2.3:a:red_hat:red_hat_build_of_keycloak:*:*:*:*:*:*:*:*) implements role-based access control through composite roles and fine-grained admin permissions. The name-based admin role check is a security gate that evaluates whether a caller has authority over a given role name. CWE-367 (Time-of-Check Time-of-Use) describes a class of race condition where the security-relevant state evaluated during the check differs from the state present during the subsequent use. In this case, the window between when Keycloak checks the admin's permissions and when it acts on the role assignment can be exploited to slip in an unauthorized realm-admin role binding. The persistence mechanism - composite role relationships that survive permission revocation and reboots - suggests the escalated privilege is stored at the realm data layer, not derived at runtime, making it immune to session invalidation or typical administrative remediation paths.
Know when Red Hat Build Of Keycloak gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
Primary rating from Vendor (redhat).
CVSS VectorVendor: redhat
DescriptionCVE.org
A flaw was found in Keycloak. An authenticated administrator with the manage-clients role can exploit a Time-of-check to time-of-use (TOCTOU) vulnerability in the name-based admin role checks. This allows the attacker to escalate their privileges to realm-admin for all users within the realm, granting them extensive control over the system. The composite role relationship persists even after the attacker's own permissions are revoked and across system reboots.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Affected Products (CPE)CVE.org
Related Vulnerabilities in Keycloak Authentication and Authorization Flaws
View all 6More in Red Hat Build Of Keycloak
View allAccount takeover in Red Hat Build of Keycloak allows an unauthenticated attacker to abuse the reset-credentials flow in
Account takeover in Keycloak (Red Hat build of Keycloak, Red Hat Single Sign-On 7) arises because the IdP-initiated SAML
Authentication bypass in Red Hat Build of Keycloak (and Red Hat Single Sign-On 7) lets an unauthenticated attacker forge
Privilege escalation in Red Hat Build of Keycloak's Dynamic Client Registration (DCR) grants an attacker with low-privil
Mismatched handling of the HTTP/1 absolute-form request authority in Red Hat build of Quarkus and other affected Red Hat
Authorization bypass in the Keycloak Policy Enforcer allows any authenticated user to circumvent all enforced access con
URI normalization bypass in Keycloak's Authorization Services PathMatcher allows authenticated low-privilege users to re
Privilege escalation in Keycloak's Dynamic Client Registration (DCR) component allows attackers with standard user accou
Token exchange in Keycloak bypasses Google Workspace domain allowlist restrictions, enabling any valid Google account ho
Signature-verification bypass in Keycloak (and Red Hat's Keycloak-based products such as Red Hat Single Sign-On 7 and Re
Tenant-restriction bypass in Keycloak's Microsoft identity provider integration allows attackers holding any valid Micro
Session hijacking via SAML assertion replay in Keycloak's SAML broker component allows adjacent-network attackers to aut
EUVD-2026-32716
GHSA-pq65-77rc-7r8c
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB