Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain manage-clients delegated role
-
DeliveryAccess Keycloak admin API or console
-
ExploitInject hardcoded realm-admin role mapper into target client
-
ExecutionAuthenticate user through modified client
-
PersistReceive JWT containing realm-admin claim
-
ImpactExercise full realm administrative control
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Privilege assignment review
|
| Exploitation Conditions | Exploitation requires an attacker to hold the manage-clients permission within the target Keycloak realm - this is a non-default, explicitly assigned delegated administrative role, confirmed by the CVSS PR:H metric. This permission is typically granted in multi-tenant or DevOps-oriented Keycloak deployments where application teams manage their own client registrations. Exploitation is specifically enabled by Keycloak's failure to enforce privilege-tier restrictions when configuring role mappers, meaning the role mapper creation feature itself must be accessible (no additional non-default configuration is required beyond holding manage-clients). Exploitation is limited by: the requirement for an existing authenticated user account with manage-clients; the absence of this permission in most standard user accounts; and the need for network access to the Keycloak admin console or REST API endpoint. Default installations where only the realm-admin role holds manage-clients are not practically exposed beyond insider threat scenarios. |
| Impact | The NVD CVSS 3.1 score of 6.5 reflects the PR:H prerequisite that meaningfully constrains exploitation to users who have already been explicitly granted manage-clients. Despite C:H and I:H impact metrics - reflecting full token compromise and realm control - the score is kept moderate by the high-privilege requirement and absence of a scope change in Red Hat's scoring. However, independently assessed, the jump from manage-clients to realm-admin is a classic privilege boundary crossing that arguably warrants S:C (scope changed), which would raise the severity considerably. There is no EPSS data provided to quantify exploitation probability, no CISA KEV listing, and no public POC, meaning real-world urgency is currently moderate rather than critical. The most significant real-world risk is in multi-tenant or delegated-admin Keycloak deployments where manage-clients permissions are distributed to non-realm-admin operators or external teams - exactly the scenario Keycloak's permission model is designed to support. In those environments, the assumed trust boundary between manage-clients and realm-admin is completely broken. Environments where only full realm admins hold manage-clients are effectively not exposed to meaningful exploitation beyond insider threat. |
| Exploit ScenarioDerived | A Keycloak operator with manage-clients permission - such as a developer or tenant administrator in a multi-tenant deployment - accesses the admin console or REST API and injects a hardcoded role mapper targeting the realm-admin role into a client they control. When any user subsequently authenticates through that client, the issued JWT contains the realm-admin role claim, and the attacker (or a user they control) can present this token to Keycloak admin APIs to gain full control over the realm, including the ability to create accounts, modify other clients, and access all protected resources. No public POC has been identified, but the technique is straightforward for anyone familiar with Keycloak's admin API. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 30, 2026
Privilege escalation in Red Hat Build of Keycloak allows an operator holding the manage-clients permission to inject a hardcoded role mapper into any client configuration, causing the realm-admin role to appear in subsequently issued tokens. This effectively grants the attacker full administrative control over the entire Keycloak realm, overriding scope restrictions that are intended to prevent exactly this delegation boundary crossing. No active exploitation has been confirmed (not listed in CISA KEV), no public proof-of-concept has been identified at time of analysis, and no EPSS data was available; however, the high-impact nature of achieving realm-admin privileges makes this a meaningful insider or delegated-admin threat.
RemediationAI
No vendor-released patch version has been independently confirmed from the available data. Monitor https://access.redhat.com/security/cve/CVE-2026-4629 for patch releases from Red Hat. In the interim, the most effective compensating control is to audit and restrict who holds the manage-clients permission across all realms - organizations practicing least privilege should ensure this role is held only by fully trusted administrators, narrowing the attack surface to the insider threat model. Where manage-clients must be delegated to lower-trust operators, consider implementing additional monitoring of protocol mapper configurations for unexpected role mapper entries referencing high-privilege roles such as realm-admin. Keycloak's built-in admin events log can be used to detect and alert on client-level mapper changes. There is no configuration setting to disable role mapper injection entirely without breaking legitimate use cases, so access restriction is the primary compensating control. Trade-off: restricting manage-clients delegation may reduce operational flexibility in multi-tenant deployments.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Keycloak is a widely deployed open-source Identity and Access Management platform commonly used for SSO, OAuth2, and OIDC token issuance in enterprise environments. Clients in Keycloak are application registrations that receive scoped JWT tokens; role mappers are protocol mapper configurations that control which roles are embedded into those tokens. The manage-clients permission is a delegated administrative privilege in Keycloak intended to allow a limited operator to administer client registrations without granting full realm-admin access - a common pattern in multi-tenant deployments. The root cause, classified as CWE-266 (Incorrect Privilege Assignment), is that the platform fails to enforce scope boundaries when a role mapper is injected with a hardcoded reference to the realm-admin composite role. A properly implemented permission model should prevent a manage-clients holder from escalating to roles above their own privilege tier. The affected product is identified by CPE cpe:2.3:a:red_hat:red_hat_build_of_keycloak:*:*:*:*:*:*:*:* - all versions of the Red Hat distribution are indicated as affected.
Know when Red Hat Build Of Keycloak gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
Scope changed to S:C because privilege escalation to realm-admin crosses the manage-clients authorization boundary, affecting all realm components beyond the attacker's granted scope.
Primary rating from Vendor (redhat).
CVSS VectorVendor: redhat
DescriptionCVE.org
A flaw was found in Keycloak. A highly privileged user with manage-clients permission can exploit this vulnerability by injecting a hardcoded role mapper into any client. This action allows the user to bypass existing scope restrictions and inject the realm-admin role into generated tokens, resulting in privilege escalation and full administrative access to the realm.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Affected Products (CPE)CVE.org
More in Red Hat Build Of Keycloak
View allAccount takeover in Red Hat Build of Keycloak allows an unauthenticated attacker to abuse the reset-credentials flow in
Account takeover in Keycloak (Red Hat build of Keycloak, Red Hat Single Sign-On 7) arises because the IdP-initiated SAML
Authentication bypass in Red Hat Build of Keycloak (and Red Hat Single Sign-On 7) lets an unauthenticated attacker forge
Privilege escalation in Red Hat Build of Keycloak's Dynamic Client Registration (DCR) grants an attacker with low-privil
Mismatched handling of the HTTP/1 absolute-form request authority in Red Hat build of Quarkus and other affected Red Hat
Authorization bypass in the Keycloak Policy Enforcer allows any authenticated user to circumvent all enforced access con
URI normalization bypass in Keycloak's Authorization Services PathMatcher allows authenticated low-privilege users to re
Privilege escalation in Keycloak's Dynamic Client Registration (DCR) component allows attackers with standard user accou
Token exchange in Keycloak bypasses Google Workspace domain allowlist restrictions, enabling any valid Google account ho
Signature-verification bypass in Keycloak (and Red Hat's Keycloak-based products such as Red Hat Single Sign-On 7 and Re
Tenant-restriction bypass in Keycloak's Microsoft identity provider integration allows attackers holding any valid Micro
Session hijacking via SAML assertion replay in Keycloak's SAML broker component allows adjacent-network attackers to aut
EUVD-2026-40300
GHSA-m4j4-8chj-8g5f
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB