{"id":"CVE-2026-9796","aliases":["CVE-2026-9796","GHSA-pq65-77rc-7r8c"],"related":[],"kind":"vulnerability","state":"published","title":"Keycloak: keycloak: privilege escalation via time-of-check to time-of-use (toctou) vulnerability","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 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Se encontró una falla en Keycloak. Un administrador autenticado con el rol ’manage-clients’ puede explotar una vulnerabilidad de tipo Time-of-check to time-of-use (TOCTOU) en las comprobaciones de roles de administrador basadas en nombres. Esto permite al atacante escalar sus privilegios a ’realm-admin’ para todos los usuarios dentro del reino, otorgándoles un control extenso sobre el sistema. La relación de rol compuesto persiste incluso después de que se revoquen los propios permisos del atacante y tras los reinicios del sistema.","source":"nvd"}],"published":"2026-05-28T04:27:08.794Z","modified":"2026-10-26T12:10:00.130Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-367"],"affected":[{"ranges":[{"type":"rpm","introduced":"26.6.6-1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.6","package":"rhbk/keycloak-operator-bundle","cpe":"cpe:/a:redhat:build_keycloak:26.6::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"26.6-12","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.6","package":"rhbk/keycloak-rhel9","cpe":"cpe:/a:redhat:build_keycloak:26.6::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"26.6-12","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.6","package":"rhbk/keycloak-rhel9-operator","cpe":"cpe:/a:redhat:build_keycloak:26.6::el9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.6.6","package":"rhbk-keycloak-rhel9/rhbk-keycloak-rhel9","cpe":"cpe:/a:redhat:build_keycloak:26.6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Build of Keycloak","package":"rhbk/keycloak-rhel9","cpe":"cpe:/a:redhat:build_keycloak:","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"26.6.4"}],"ecosystem":"Maven","package":"org.keycloak:keycloak-server","purl":"pkg:maven/org.keycloak/keycloak-server","source":"ghsa"},{"ranges":[],"vendor":"redhat","product":"build_of_keycloak","cpe":"cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:-:*:*:*","source":"nvd"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2026:56523","tags":["vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:56524","tags":["vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-9796","tags":["vdb-entry","vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2482464","tags":["issue-tracking","vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-9796","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/keycloak/keycloak/issues/49427","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/keycloak/keycloak/pull/49624","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/keycloak/keycloak/commit/39cb8de54c8517efeda4baa8bc314fd40e9c6934","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/keycloak/keycloak","tags":["package"],"sources":["ghsa"]}],"credits":["Red Hat would like to thank Daniel Peters (Operating Intelligence Inc.), Lior Moshe (Operating Intelligence Inc.), and Uri Rolls (Operating Intelligence Inc.) for reporting this issue."],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-28T12:16:43.517Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-9796","url":"https://www.cve.org/CVERecord?id=CVE-2026-9796","licence":"CVE Terms of Use","modified":"2026-09-15T11:39:48.493Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pq65-77rc-7r8c","url":"https://github.com/advisories/GHSA-pq65-77rc-7r8c","licence":"CC-BY-4.0","modified":"2026-08-19T00:45:06.924Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-9796","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-9796","licence":"Public domain","modified":"2026-10-26T12:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:22.733Z","epss":{"score":0.00219,"percentile":0.13169,"date":"2026-12-01T12:00:22.000Z"}}