Keycloak Privilege Escalation via Role Mapper Injection
CVE-2026-4629 Published on June 30, 2026
Keycloak: keycloak: privilege escalation through hardcoded role mapper injection
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.
Vulnerability Analysis
CVE-2026-4629 can be exploited with network access, and requires user privileges. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have a high impact on confidentiality and integrity, and no impact on availability.
Timeline
Reported to Red Hat.
Made public. 28 days later.
Weakness Type
Incorrect Privilege Assignment
A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
Products Associated with CVE-2026-4629
Want to know whenever a new CVE is published for Red Hat Build Keycloak? stack.watch will email you.
Affected Versions
Red Hat build of Keycloak 26.4:- Version 26.4.14-1 and below * is unaffected.
- Version 26.4-22 and below * is unaffected.
- Version 26.4-22 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.