Executive brief
Keycloak, an open-source identity and access management solution, contains a vulnerability in its fine-grained administrative permissions. An administrator with restricted permissions can bypass security controls to assign highly privileged roles to themselves or others. This could lead to a full takeover of the Keycloak realm and unauthorized access to sensitive corporate data and applications.
Technical details
A privilege escalation vulnerability exists in Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature due to improper scope mapping enforcement. Specifically, the ScopeMappedResource and ScopeMappedClientResource components failed to properly validate 'requireMapClientScope' permissions. An attacker with limited client management administrative privileges can exploit this to assign any realm role, including high-privilege roles, to a client's scope mapping. When a user subsequently authenticates via that modified client, the unauthorized roles are injected into their authentication token. This allows the attacker to escalate their privileges within the Keycloak realm. The issue is fixed in version 26.6.4.
Affected products
- Keycloak Keycloak < 26.6.4
- Red Hat Red Hat build of Keycloak 26.4, 26.6
Timeline
- 2026-06-25: disclosed: Issue opened in Keycloak repository
- 2026-06-26: advisory: Initial advisory published by Red Hat and Keycloak
- 2026-07-01: patched: Fix merged and version 26.6.4 released
References
- https://github.com/keycloak/keycloak/security/advisories/GHSA-32h4-44jj-c5vx
- https://github.com/keycloak/keycloak/issues/50350
- https://github.com/keycloak/keycloak/pull/50451
- https://github.com/keycloak/keycloak/commit/8894c027e788904c740ff9a1a60fcfaa34a10d13
- https://access.redhat.com/errata/RHSA-2026:30049