A flaw was found in Keycloak's Dynamic Client Registration (DCR) security policy management. The "Allowed Protocol Mapper Types" policy, which restricts which types of data mappers a client can use, fails to re-validate the mapper type during a client update if the mapper's configuration remains unchanged. An attacker with client registration privileges can exploit this by first registering an allowed mapper type with a malicious configuration and then swapping it for a restricted, high-privilege mapper type (such as one that hardcodes administrative roles). This allows the attacker to gain full administrative access to the Keycloak realm.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HRed Hat Build Of Keycloak
APPRedhat26.4 – 26.4.14 (excl.)26.6 – 26.6.5 (excl.)
Related vulnerabilities
Pominięcie weryfikacji podpisu SAML w Red Hat Build of Keycloak
Keycloak: ominięcie polityki bezpieczeństwa przez nieprawidłową normalizację URI
Keycloak DCR: fałszowanie ról administracyjnych przez User Property mapper
Keycloak SAML Broker: pominięcie ograniczeń logowania w IdP-initiated SSO
Keycloak: pominięcie walidacji statusu konta przy JWT authorization grant