CVE-2026-4629

Keycloak: keycloak: privilege escalation through hardcoded role mapper injection

State
Published
Severity
6.5 Medium
Published
Jun 30, 2026
Updated
Oct 22, 2026
Reserved
Mar 23, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:Nredhat

Weaknesses

  • CWE-266 Incorrect Privilege Assignment

Affected Products

ProductVersions
Red Hat build of Keycloak 26.4Red Hat
  • 26.4.14-1 and laterNot affected
Red Hat build of Keycloak 26.4Red Hat
  • 26.4-22 and laterNot affected
Red Hat build of Keycloak 26.4Red Hat
  • 26.4-22 and laterNot affected
Red Hat build of Keycloak 26.4.14Red Hat
    Red Hat build of Keycloak 26.6.5Red Hat

      References

      Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.