CVE-2026-9796

Keycloak: keycloak: privilege escalation via time-of-check to time-of-use (toctou) vulnerability

Published May 28, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
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.

Remediation

Vendor 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.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pq65-77rc-7r8c Keycloak has a Time-of-check Time-of-use (TOCTOU) Race Condition
History
Type Values Removed Values Added
CPEs cpe:/a:redhat:build_keycloak:
Type Values Removed Values Added
CPEs cpe:/a:redhat:build_keycloak: cpe:/a:redhat:build_keycloak:26.6
cpe:/a:redhat:build_keycloak:26.6::el9
References
Type Values Removed Values Added
First Time appeared Redhat build Of Keycloak
CPEs cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:-:*:*:*
Vendors & Products Redhat build Of Keycloak
Type Values Removed Values Added
First Time appeared Redhat keycloak
Vendors & Products Redhat keycloak
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Keycloak: keycloak: privilege escalation via time-of-check to time-of-use (toctou) vulnerability
First Time appeared Redhat
Redhat build Keycloak
Weaknesses CWE-367
CPEs cpe:/a:redhat:build_keycloak:
Vendors & Products Redhat
Redhat build Keycloak
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Sep 15, 2026, 11:39 AM
Reserved
May 28, 2026, 3:31 AM
Status
Modified
Published
May 28, 2026, 5:16 AM
Modified
Oct 26, 2026, 12:10 PM
Severity
Moderate
Public date
May 28, 2026, 3:32 AM