---
id: CVE-2026-4629
title: >-
  Keycloak: keycloak: privilege escalation through hardcoded role mapper
  injection
summary: >-
  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
  restriction…
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N'
cvssSource: cna
cwe:
  - CWE-266
vendor: Red Hat
product: rhbk/keycloak-operator-bundle
affected:
  - rhbk/keycloak-operator-bundle (all versions)
  - rhbk/keycloak-rhel9 (all versions)
  - rhbk/keycloak-rhel9-operator (all versions)
  - rhbk/keycloak-rhel9
  - build_of_keycloak_26.6.5
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-07-01T14:26:33.448859Z'
published: '2026-06-30'
updated: '2026-10-22'
sourceUpdated: '2026-10-22T20:39:25.736Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-4629'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2026:50846'
    label: 'RHSA-2026:50846'
  - url: 'https://access.redhat.com/errata/RHSA-2026:50847'
    label: 'RHSA-2026:50847'
  - url: 'https://access.redhat.com/errata/RHSA-2026:50848'
    label: 'RHSA-2026:50848'
  - url: 'https://access.redhat.com/security/cve/CVE-2026-4629'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2450244'
    label: RHBZ#2450244
tags:
  - cve.org
epss: 0.00486
epssPercentile: 0.40851
ingestedAt: '2026-10-22T22:00:50.431Z'
---

## Overview

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.

## Affected

- `rhbk/keycloak-operator-bundle (all versions)`
- `rhbk/keycloak-rhel9 (all versions)`
- `rhbk/keycloak-rhel9-operator (all versions)`
- `rhbk/keycloak-rhel9`
- `build_of_keycloak_26.6.5`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
