{"id":"GHSA-pq65-77rc-7r8c","summary":"Keycloak has a Time-of-check Time-of-use (TOCTOU) Race Condition","details":"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.","aliases":["CVE-2026-9796"],"modified":"2026-08-19T00:45:06.924619010Z","published":"2026-05-28T06:31:09Z","database_specific":{"nvd_published_at":"2026-05-28T05:16:41Z","cwe_ids":["CWE-367"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-07-01T21:24:41Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-9796"},{"type":"WEB","url":"https://github.com/keycloak/keycloak/issues/49427"},{"type":"WEB","url":"https://github.com/keycloak/keycloak/pull/49624"},{"type":"WEB","url":"https://github.com/keycloak/keycloak/commit/39cb8de54c8517efeda4baa8bc314fd40e9c6934"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:56523"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:56524"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-9796"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2482464"},{"type":"PACKAGE","url":"https://github.com/keycloak/keycloak"}],"affected":[{"package":{"name":"org.keycloak:keycloak-server","ecosystem":"Maven","purl":"pkg:maven/org.keycloak/keycloak-server"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"26.6.4"}]}],"versions":["1.0-alpha-1-12062013","1.0-final","1.0-rc-1","1.0-rc-2","1.0.1.Final","1.0.2.Final","1.0.3.Final","1.0.4.Final","1.0.5.Final","1.1.0.Beta1","1.1.0.Beta2","1.1.0.Final","1.1.1.Final","1.2.0.Beta1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-pq65-77rc-7r8c/GHSA-pq65-77rc-7r8c.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N"}]}