# CVE-2026-12388: Keycloak privilege escalation in Identity Provider mapper

Source: https://junglewise.ai/threats/cve-2026-12388-keycloak-privilege-escalation-in-identity-provider-mapper  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-30. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-12388 · Severity: medium · CVSS 6.5 · Published 2026-06-30

Keycloak is an open-source identity and access management solution used to secure applications and manage user identities. A security flaw in its identity provider component allows a restricted administrator to bypass safety checks and grant themselves full administrative control over the entire system. This could lead to a complete takeover of the security realm, allowing the attacker to access or modify all user data and system configurations.

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

## Quick answers

**Is CVE-2026-12388 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-12388 being exploited in the wild.

**How severe is CVE-2026-12388?** Medium severity, with a CVSS score of 6.5, published 30 June 2026.

**Which products and versions are affected?** Red Hat Keycloak; Red Hat Red Hat Build of Keycloak.

**Is there a fix for CVE-2026-12388?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-12388 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-12388?** Check whether you run Red Hat build of Keycloak. 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

An improper authorization flaw exists in the Identity Provider (IdP) mapper component (org.keycloak.broker) of Keycloak. The endpoint fails to enforce the 'requireMapRole' authorization check, which is intended to prevent administrators from assigning roles they do not themselves possess. An attacker with 'manage-identity-providers' permissions can exploit this by creating a 'Hardcoded Role' mapper for a malicious OIDC or SAML provider that targets high-privilege roles like 'realm-admin'. Upon authenticating through the controlled IdP, the high-level role is injected into the user's session, resulting in full privilege escalation.

## Affected products

- Red Hat Keycloak
- Red Hat Red Hat Build of Keycloak

## Timeline

- 2026-06-16: other: Reported to Red Hat Bugzilla
- 2026-06-30: disclosed: CVE published

## References

- [https://access.redhat.com/downloads/content/package-browser/](https://access.redhat.com/downloads/content/package-browser/)
- [https://access.redhat.com/security/cve/CVE-2026-12388](https://access.redhat.com/security/cve/CVE-2026-12388)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2489140](https://bugzilla.redhat.com/show_bug.cgi?id=2489140)

## Related threats

- [Keycloak SAML HTTP Parameter Pollution in HTTP-Redirect binding](https://junglewise.ai/threats/cve-2026-18217-keycloak-saml-http-parameter-pollution-in-http-redirect-binding)
- [Keycloak keycloak-services improper wildcard domain validation in client policies](https://junglewise.ai/threats/cve-2026-18206-keycloak-keycloak-services-improper-wildcard-domain-validation-in)
- [Keycloak keycloak-services authorization bypass in role-users endpoint](https://junglewise.ai/threats/cve-2026-17059-keycloak-keycloak-services-authorization-bypass-in-role-users)
- [Red Hat Keycloak authorization bypass in FGAP v2 child group endpoint](https://junglewise.ai/threats/cve-2026-14615-red-hat-keycloak-authorization-bypass-in-fgap-v2-child-group)
- [Keycloak Policy Enforcer authorization bypass via incorrect URI comparison](https://junglewise.ai/threats/cve-2026-9800-keycloak-policy-enforcer-authorization-bypass-via-incorrect-uri)
