# Keycloak privilege escalation in Fine-Grained Admin Permissions scope mapping

Source: https://junglewise.ai/threats/keycloak-privilege-escalation-in-fine-grained-admin-permissions-scope-ac845052  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-28. Updated: 2026-07-01  
License: CC BY 4.0 with a link back

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

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.

Technologies: [Keycloak](https://junglewise.ai/threats/technologies/keycloak), [org.keycloak:keycloak-services (Maven)](https://junglewise.ai/threats/technologies/org-keycloak-keycloak-services), [Red Hat build of Keycloak 26.4](https://junglewise.ai/threats/technologies/red-hat-build-of-keycloak). Vendors: [Keycloak](https://junglewise.ai/threats/vendors/keycloak), [Maven](https://junglewise.ai/threats/vendors/maven), [Red Hat](https://junglewise.ai/threats/vendors/red-hat).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.3, published 28 May 2026.

**Which products and versions are affected?** Keycloak < 26.6.4; org.keycloak:keycloak-services (Maven) < 26.6.4; Red Hat build of Keycloak 26.4 < 26.4.13; Red Hat build of Keycloak 26.6 < 26.6.4-2.

**Is there a fix for This vulnerability?** A patch was published on 2026-06-25: Red Hat security advisory RHSA-2026:30083 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run Keycloak, org.keycloak:keycloak-services (Maven), Red Hat build of Keycloak 26.4 or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

- [https://access.redhat.com/security/cve/CVE-2026-9795](https://access.redhat.com/security/cve/CVE-2026-9795)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2482462](https://bugzilla.redhat.com/show_bug.cgi?id=2482462)
- [https://access.redhat.com/errata/RHSA-2026:30083](https://access.redhat.com/errata/RHSA-2026:30083)
- [https://access.redhat.com/errata/RHSA-2026:30084](https://access.redhat.com/errata/RHSA-2026:30084)
- [https://access.redhat.com/errata/RHSA-2026:30049](https://access.redhat.com/errata/RHSA-2026:30049)

## Related threats

- [Keycloak login-failure storage synchronization error in MySQL/MariaDB](https://junglewise.ai/threats/cve-2026-112201-a-flaw-was-found-in-the-login-failure-storage-component-of)
- [Keycloak PKCE bypass in login after password reset](https://junglewise.ai/threats/cve-2026-125652-a-flaw-was-found-in-the-keycloak-services-component-of-keycloak)
- [Keycloak server arbitrary code execution in client authorization](https://junglewise.ai/threats/cve-2026-120984-a-flaw-was-found-in-the-keycloak-server-s-client-management)
- [Keycloak token sanitization bypass in protocol mapper](https://junglewise.ai/threats/cve-2026-97848-a-flaw-was-found-in-the-token-sanitization-logic-of-keycloak-an)
- [Keycloak Dynamic Client Registration privilege escalation](https://junglewise.ai/threats/cve-2026-96547-a-flaw-was-found-in-the-dynamic-client-registration-component-of)
