Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain delegated IdP-management admin credentials
-
DeliveryAccess Keycloak admin console over network
-
ExploitCreate Hardcoded Role mapper assigning realm-admin
-
ExecutionTrigger IdP authentication flow as target account
-
PersistRealm-admin role silently assigned
-
ImpactExercise full realm 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 existing Keycloak account with the identity provider management administrative role - this is a non-default, explicitly delegated privilege that realm administrators must grant. The attack is specific to the 'Hardcoded Role' mapper type within IdP mapper configuration; Keycloak instances with no configured external identity providers or with no delegated IdP admin accounts are not exploitable. CVSS PR:H confirms that standard authenticated users without administrative scope cannot trigger this flaw. Exploitation is further limited to network-accessible Keycloak admin console endpoints (AV:N), meaning airgapped or internally-restricted management planes reduce exposure. The primary limiting factor is the requirement for delegated IdP management access, making this a targeted insider-threat or privilege-boundary-abuse scenario rather than an opportunistic remote attack. |
| Impact | The CVSS 3.1 score of 6.5 (Medium) is derived from vector AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N. The PR:H requirement is the primary risk limiter: exploitation demands an existing account with identity provider management privileges, which is not a default role and must be explicitly delegated by a realm administrator. This constrains the attack surface to insider-threat and supply-chain scenarios, or environments where IdP admin delegation is broadly distributed. The C:H/I:H impact reflects that successful exploitation yields unrestricted realm control - including the ability to create new admin users, exfiltrate realm configuration, and modify authentication policies. EPSS data is not available in the provided intelligence, so exploitation probability cannot be quantified probabilistically. No CISA KEV listing and no public POC have been identified, so there is no evidence of active or opportunistic exploitation at time of analysis. The real-world priority is elevated in SaaS, MSP, or enterprise SSO deployments with delegated administration models; organizations with monolithic all-or-nothing admin grants face minimal additional exposure. |
| Exploit ScenarioDerived | A semi-trusted administrator - for example, a partner organization's account provisioned with identity provider management scope in a shared Keycloak realm - logs into the Keycloak admin console and navigates to the IdP mapper configuration for any configured external provider. The attacker creates a new Hardcoded Role mapper targeting the built-in realm-admin role; on the attacker's next login through that IdP, the realm-admin role is silently assigned to their account. The attacker then exercises unrestricted realm control, including creating backdoor admin accounts, exporting user credential hashes, or altering authentication flows. No public POC is identified at time of analysis. |
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's Identity Provider mapper component allows a restricted administrator with IdP management permissions to silently assign the built-in realm-admin role to themselves or other accounts by creating a Hardcoded Role mapper. This bypasses the authorization boundary intended to confine limited administrators within their delegated scope, resulting in full realm takeover. No public exploit code or CISA KEV listing exists at time of analysis; however, the impact is severe in multi-tenant or delegated-administration deployments where IdP management is granted to semi-trusted parties.
RemediationAI
The primary fix should be obtained from the Red Hat security advisory at https://access.redhat.com/security/cve/CVE-2026-12388; no specific patched version number is confirmed in the available intelligence, so consult that advisory for the exact target release. As an immediate compensating control, audit all existing Hardcoded Role mappers across every configured identity provider in each realm and remove or reconfigure any mapper that assigns realm-admin or other high-privilege compound roles - this eliminates any pre-staged escalation paths. Revoke identity provider management permissions from any administrator account that does not have a verified business need for that specific delegated role, tightening the privilege assignment model. Restrict the Keycloak admin console to a dedicated management network segment or VPN to reduce network-level exposure (trade-off: increases operational friction for distributed admin teams). Monitor Keycloak audit logs for unexpected role assignment events, particularly additions of realm-admin to accounts that did not previously hold it.
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's Identity Provider subsystem supports attribute mappers - plugins that transform user data received from external IdPs into Keycloak's internal user model. The 'Hardcoded Role' mapper type statically assigns a specified Keycloak role to any user authenticating via the associated IdP, regardless of claims in the identity token. The root cause is CWE-266 (Incorrect Privilege Assignment): the authorization logic governing mapper creation fails to enforce that the assigning administrator can only grant roles up to their own privilege ceiling. Consequently, an account holding only the identity-provider-management role can specify the privileged realm-admin compound role as the hardcoded target, circumventing the intended privilege separation. The affected product per CPE is cpe:2.3:a:red_hat:red_hat_build_of_keycloak:*:*:*:*:*:*:*:*, covering all version lines of the Red Hat distribution.
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
PR:H reflects mandatory IdP admin role; AV:N for web console access; no availability impact from role assignment alone.
Primary rating from Vendor (redhat).
CVSS VectorVendor: redhat
DescriptionCVE.org
A flaw was found in the Identity Provider (IdP) mapper component of Keycloak, which is used to manage how user information from external services is mapped to Keycloak users. An administrator with limited permissions to manage identity providers can exploit this flaw by creating a "Hardcoded Role" mapper that assigns high-level administrative roles (like realm-admin) to themselves or others. This allows a restricted administrator to bypass security checks and gain full control over the entire 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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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-40301
GHSA-jxqv-2jjx-692h
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB