HIGH 7.7

CVE-2026-9099: Keycloak Group Reparenting Authorization Bypass – Privilege Escalation to Realm Takeover

Keycloak contains an authorization bypass in its Admin REST API that allows an authenticated administrator with limited permissions to rearrange group hierarchies in an unexpected way. Specifically, an admin managing a low-privilege group can move a high-privilege group (like one with realm-admin access) to be a child of their own group. Because Keycloak's group permissions cascade hierarchically, this manipulation grants the attacker unintended management authority over the members of the elevated group—including the ability to reset passwords. An attacker exploiting this could reset an administrator's password, take over their account, and ultimately compromise the entire Keycloak realm.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.7 HIGH · CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:N
Weaknesses (CWE)
CWE-639
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-07-15

NVD description (verbatim)

A flaw was found in Keycloak. A missing authorization check in the GroupResource.addChild() endpoint within the Admin REST API allows an authenticated user with limited administrative privileges to reparent any existing group. When Fine-Grained Admin Permissions v2 (FGAPv2) is enabled, an attacker with management rights over a single low-privilege group can reparent a highly privileged group (such as one possessing the realm-admin role) under their managed group. Because group permissions follow a hierarchical structure, this action unauthorizedly grants the attacker management and password-reset capabilities over the members of the targeted privileged group. An attacker can exploit this to reset an administrator's password, compromise the account, and achieve a full realm takeover, leading to a complete compromise of confidentiality, integrity, and availability.

13 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in the GroupResource.addChild() endpoint of Keycloak's Admin REST API. When Fine-Grained Admin Permissions v2 (FGAPv2) is enabled, the endpoint fails to properly validate whether an authenticated user has authorization to reparent a group. An attacker with admin privileges scoped to a single group can invoke this endpoint to move an arbitrary group—including those with elevated roles such as realm-admin—into a child position beneath their managed group. Because Keycloak implements hierarchical permission inheritance for group management, the reparenting action causes the attacker to inherit administrative control over the reparented group's members. This missing authorization check is rooted in CWE-639 (Authorization Bypass Through User-Controlled Key), where the attacker can manipulate group structure parameters to bypass intended privilege boundaries.

Business impact

A successful exploitation grants an attacker with limited admin credentials the ability to escalate privileges to full realm control. The attack chain is particularly dangerous because it targets identity and access management infrastructure: compromising a Keycloak realm means an attacker can reset any user's password, impersonate any identity, and modify access policies across all dependent applications. Organizations relying on Keycloak for centralized authentication and authorization would experience a complete loss of confidentiality, integrity, and availability of their identity layer. This extends the blast radius to every application and service consuming Keycloak authentication.

Affected systems

Red Hat build of Keycloak is the confirmed affected product. The vulnerability is only exploitable when Fine-Grained Admin Permissions v2 (FGAPv2) is enabled—organizations running standard Keycloak deployments without FGAPv2 enabled are not susceptible to this particular attack vector. However, FGAPv2 represents the modern permission model for Keycloak and is likely enabled in security-conscious deployments, making this a concern for a significant subset of Keycloak users.

Exploitability

Exploitation requires an authenticated attacker with existing admin privileges, albeit limited in scope (e.g., managing only one group). The attack is network-accessible and requires no user interaction. The CVSS score of 7.7 (HIGH) reflects the high-complexity nature of the attack (requiring specific FGAPv2 configuration and scoped admin credentials), but the impact severity is significant given the privilege escalation potential and path to realm takeover. The vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, suggesting active in-the-wild exploitation has not yet been widely documented, though the simplicity of the attack vector once privileges are obtained makes this a high-priority defensive concern.

Remediation

Obtain and apply the security patch from Red Hat for Keycloak. Given the severity of the vulnerability and the ease of exploitation for a privileged attacker, patching should be prioritized immediately. Until a patch is available or deployed, mitigate by disabling Fine-Grained Admin Permissions v2 (FGAPv2) if your operational model permits, or by strictly limiting the number of admin users who have group management rights. Monitor admin API calls to the GroupResource.addChild() endpoint for suspicious reparenting operations, particularly moves involving high-privilege groups.

Patch guidance

Contact Red Hat and verify the specific patch version for your Keycloak build through the official security advisory. Apply patches in a staged manner: test in a non-production environment first, then deploy to production with appropriate change management. Verify that FGAPv2 remains enabled post-patch and that group hierarchies have not been maliciously altered during the window of vulnerability. Consider performing a post-patch audit of group structure and permissions to detect any unauthorized reparenting that may have occurred.

Detection guidance

Monitor Admin REST API logs, specifically the GroupResource.addChild() endpoint, for unusual group reparenting operations. Flag any attempts to move high-privilege groups (those with roles like realm-admin) under other groups managed by lower-privileged admins. Implement alerting on group hierarchy changes that violate your expected organizational structure. Check for password reset operations by low-privilege admins targeting high-privilege user accounts, which may indicate post-exploitation activity. Review IAM audit logs for unauthorized privilege escalation or lateral movement following any detected group reparenting.

Why prioritize this

Despite not appearing on the CISA KEV list, this vulnerability merits immediate prioritization because it directly compromises Keycloak—a critical identity infrastructure component. The attack requires only compromised low-privilege admin credentials (a realistic threat model) and directly enables full realm takeover. The HIGH CVSS score, combined with the foundational nature of Keycloak in authentication stacks, makes this a top-tier remediation candidate. Organizations should treat this similarly to critical authentication bypass vulnerabilities.

Risk score, explained

The CVSS 3.1 score of 7.7 reflects: high impact (complete compromise of confidentiality, integrity across a realm) but moderated by the requirement for an authenticated attacker with admin credentials and FGAPv2-enabled configuration. The HIGH severity is appropriate given the access required is not simply network-unauthenticated; however, in environments where admin credentials are routinely distributed across teams or potentially compromised, the exploitability rises substantially. The high-complexity vector (AC:H) acknowledges that not all Keycloak instances have FGAPv2 enabled, reducing the attack surface compared to an unauthenticated flaw, but organizations with modern permission models should view this as HIGH-critical in practice.

Frequently asked questions

Does this vulnerability affect Keycloak deployments with Fine-Grained Admin Permissions v2 (FGAPv2) disabled?

No. FGAPv2 must be enabled for this vulnerability to be exploitable. If your deployment uses the legacy permission model, you are not at risk from this specific flaw. However, verify your FGAPv2 status in your Keycloak configuration to confirm.

Can an attacker exploit this if they only have read-only or non-admin access?

No. The attacker must possess authenticated admin credentials with at least group management rights over some group. This is not an unauthenticated or low-privilege user vulnerability; it requires a compromised or malicious insider with scoped admin access.

What is the fastest way to mitigate this before patching?

The most direct mitigation is to temporarily disable Fine-Grained Admin Permissions v2 if your operational model allows it, reverting to the legacy permission system. Alternatively, strictly audit and minimize the number of user accounts with group management privileges, and implement monitoring on GroupResource.addChild() API calls for suspicious reparenting behavior targeting high-privilege groups.

If an attacker successfully exploits this, can they persist access after the patch is applied?

Yes. If an attacker has reset an administrator's password during the exploitation window, they maintain access to the realm under that administrator's identity even after patching. Patching closes the privilege-escalation vector but does not automatically revoke compromised credentials. Post-patch, conduct a thorough audit of password changes, active sessions, and user accounts to identify and remediate any compromised identities.

This analysis is provided for informational purposes and reflects the vulnerability details as published. Patch version numbers, specific remediation timelines, and vendor-specific mitigations should be verified directly against the official Red Hat Keycloak security advisory. Organizations should test patches thoroughly in non-production environments before deployment. The absence of a vulnerability from the CISA KEV catalog does not indicate lower risk; prioritization should be based on your specific deployment configuration and threat model. SEC.co makes no warranty regarding the completeness or accuracy of this analysis and recommends consulting with qualified security professionals for implementation guidance specific to your environment. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).