Junglewise Threat Intelligence

Keycloak privilege escalation in Fine-Grained Admin Permissions scope mapping

Severity: high · CVSS 7.3 · Published 2026-05-28

Technologies: Red Hat build of Keycloak 26.6, org.keycloak:keycloak-services (Maven), Keycloak. Vendors: Red Hat, Maven, Keycloak.

Executive brief

Keycloak, a popular open-source identity and access management solution, contains a security flaw in its fine-grained administrative permissions feature. An administrator with limited permissions could exploit this to grant themselves or others highly privileged roles, such as full system administrator rights. If successful, this allows an attacker to escalate their privileges and potentially gain full control over the security realm, compromising user data and system integrity.

Technical details

A privilege escalation vulnerability exists in Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature within the org.keycloak.services.resources.admin component. The ScopeMappedResource and ScopeMappedClientResource write endpoints fail to properly enforce the MAP_ROLE_CLIENT_SCOPE permission. An attacker with limited 'manage' permissions on a single client can bypass security boundaries to attach any realm role (including realm-admin) to a client's scope mapping. When a privileged user subsequently authenticates through that modified client, the unauthorized role is projected into their authentication token. This requires FGAPv2 to be enabled and involves a high level of complexity as it requires interaction from a privileged user. The issue is addressed in Keycloak version 26.6.4 and corresponding Red Hat builds.

Affected products

  • Keycloak Keycloak < 26.6.4
  • Red Hat Red Hat build of Keycloak 26.4 < 26.4.13
  • Red Hat Red Hat build of Keycloak 26.6 < 26.6.4-2

Timeline

  • 2026-05-28: disclosed: Initial disclosure and Bugzilla report
  • 2026-06-25: patched: Red Hat security advisory RHSA-2026:30083 released
  • 2026-07-01: other: GitHub advisory GHSA-8hcx-p7m8-gc28 withdrawn as a duplicate of GHSA-32h4-44jj-c5vx

References

Related threats