Skip to main content

Red Hat Keycloak EUVDEUVD-2026-32716

| CVE-2026-9796 MEDIUM
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
2026-05-28 redhat GHSA-pq65-77rc-7r8c
6.5
CVSS 3.1 · Vendor: redhat
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain manage-clients delegated admin credentials
  2. Delivery
    Initiate role assignment request targeting realm-admin
  3. Exploit
    Race the TOCTOU window in name-based check
  4. Execution
    Composite realm-admin role binding written to data store
  5. Impact
    Verify 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

maven org.keycloak:keycloak-server fix: 26.6.4

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

Vendor (redhat) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

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

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

EPSS Score
0.0%
Top 94% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:red_hat:red_hat_build_of_keycloak:*:*:*:*:*:*:*:*
CVE-2026-18963 CRITICAL POC
9.1 Aug 18

Account takeover in Red Hat Build of Keycloak allows an unauthenticated attacker to abuse the reset-credentials flow in

CVE-2026-16442 CRITICAL
9.8 Aug 05

Account takeover in Keycloak (Red Hat build of Keycloak, Red Hat Single Sign-On 7) arises because the IdP-initiated SAML

CVE-2026-16443 CRITICAL
9.1 Aug 05

Authentication bypass in Red Hat Build of Keycloak (and Red Hat Single Sign-On 7) lets an unauthenticated attacker forge

CVE-2026-15572 HIGH
8.8 Aug 05

Privilege escalation in Red Hat Build of Keycloak's Dynamic Client Registration (DCR) grants an attacker with low-privil

CVE-2026-93569 HIGH
8.2 Sep 18

Mismatched handling of the HTTP/1 absolute-form request authority in Red Hat build of Quarkus and other affected Red Hat

CVE-2026-9800 HIGH
8.1 Jun 25

Authorization bypass in the Keycloak Policy Enforcer allows any authenticated user to circumvent all enforced access con

CVE-2026-15573 HIGH
8.1 Aug 05

URI normalization bypass in Keycloak's Authorization Services PathMatcher allows authenticated low-privilege users to re

CVE-2026-16102 HIGH
8.1 Aug 05

Privilege escalation in Keycloak's Dynamic Client Registration (DCR) component allows attackers with standard user accou

CVE-2026-18214 HIGH
8.1 Jul 31

Token exchange in Keycloak bypasses Google Workspace domain allowlist restrictions, enabling any valid Google account ho

CVE-2026-11800 HIGH
8.1 Jun 25

Signature-verification bypass in Keycloak (and Red Hat's Keycloak-based products such as Red Hat Single Sign-On 7 and Re

CVE-2026-18215 HIGH
8.1 Jul 31

Tenant-restriction bypass in Keycloak's Microsoft identity provider integration allows attackers holding any valid Micro

CVE-2026-18967 HIGH
8.1 Aug 06

Session hijacking via SAML assertion replay in Keycloak's SAML broker component allows adjacent-network attackers to aut

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy