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

- Severity: Medium 6.5 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2026-05-28T04:27:08.794Z
- Modified: 2026-10-26T12:10:00.130Z
- Also known as: GHSA-pq65-77rc-7r8c
- Weaknesses: CWE-367
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

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

(As written by CVE List.)

## Affected

- rhbk/keycloak-operator-bundle: no versions given (not affected: from 26.6.6-1 before *)
- rhbk/keycloak-rhel9: no versions given (not affected: from 26.6-12 before *)
- rhbk/keycloak-rhel9-operator: no versions given (not affected: from 26.6-12 before *)
- rhbk-keycloak-rhel9/rhbk-keycloak-rhel9: no versions given
- org.keycloak:keycloak-server (Maven): before 26.6.4
- redhat build_of_keycloak: no versions given

## Every score

- redhat: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://access.redhat.com/errata/RHSA-2026:56523> (vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2026:56524> (vendor-advisory, web)
- <https://access.redhat.com/security/cve/CVE-2026-9796> (vdb-entry, vendor-advisory, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2482464> (issue-tracking, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-9796> (advisory)
- <https://github.com/keycloak/keycloak/issues/49427> (web)
- <https://github.com/keycloak/keycloak/pull/49624> (web)
- <https://github.com/keycloak/keycloak/commit/39cb8de54c8517efeda4baa8bc314fd40e9c6934> (web)
- <https://github.com/keycloak/keycloak> (package)

## Sources

- CVE List: [CVE-2026-9796](https://www.cve.org/CVERecord?id=CVE-2026-9796), CVE Terms of Use, modified 2026-09-15
- GitHub Advisory Database: [GHSA-pq65-77rc-7r8c](https://github.com/advisories/GHSA-pq65-77rc-7r8c), CC-BY-4.0, modified 2026-08-19
- NVD: [CVE-2026-9796](https://nvd.nist.gov/vuln/detail/CVE-2026-9796), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-9796 · Whole record: https://cve.day/CVE-2026-9796.json · Rebuilt by cve.day 2026-11-25T22:59:22.733Z
