---
id: CVE-2026-9796
title: A flaw was found in Keycloak
summary: >-
  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…
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N'
cwe:
  - CWE-367
vendor: redhat
product: build_of_keycloak
affected:
  - build_of_keycloak
published: '2026-05-28'
updated: '2026-09-15'
sourceUpdated: '2026-09-15T12:17:55.960'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-9796'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2026:56523'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:56524'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2026-9796'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2482464'
    label: secalert@redhat.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9796.json
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-9796'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-9796'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-05-28T12:16:43.517458Z'
epss: 0.00219
epssPercentile: 0.12624
ingestedAt: '2026-09-15T12:36:50.167Z'
patched:
  - build_of_keycloak 26.6
  - build_of_keycloak 26.6.6
---

## Overview

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.

## Affected

- `build_of_keycloak`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **RHSA-2026:56524** · Red Hat · fixed in: Red Hat build of Keycloak 26.6 · released 2026-08-18 · [advisory](https://access.redhat.com/errata/RHSA-2026:56524)
- **RHSA-2026:56523** · Red Hat · fixed in: Red Hat build of Keycloak 26.6.6 · released 2026-08-18 · [advisory](https://access.redhat.com/errata/RHSA-2026:56523)
- **Red Hat VEX** · Moderate · affected: Red Hat Build of Keycloak · no fix planned: Red Hat Build of Keycloak · updated 2026-09-15 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9796.json)
