REDHAT-BUG-2499592: High severity Keycloak Keycloak Dynamic Client Registration (DCR) vulnerability

Published Jul 13, 2026
·
Updated

A policy bypass vulnerability exists in Keycloak's Dynamic Client Registration (DCR) "Allowed Protocol Mapper Types" policy. The root cause is located in the testMappers() method of ProtocolMappersClientRegistrationPolicy.java. When a client is updated, the policy checks if the protocol mapper type is in the allow-list. If it is not, the code attempts to verify if the mapper already exists. However, it only validates that the config map of the incoming mapper matches the config of the existing persisted mapper; it fails to verify that the protocolMapper type itself has not changed. An attacker can exploit this by: Registering a client with an allowed mapper type (e.g., oidc-usermodel-attribute-mapper) but providing a configuration intended for a restricted mapper (e.g., {"role": "realm-management.realm-admin"}).

Performing a DCR PUT update that keeps the configuration identical but changes the protocolMapper type to a disallowed one, such as oidc-hardcoded-role-mapper.

Because the configuration is identical, the policy bypasses the type check. Once persisted, the oidc-hardcoded-role-mapper uses the "role" configuration to inject the realm-admin role into the client's tokens, escalating the attacker to a full realm administrator.

Affected Software

1 affected component
Keycloak Keycloak Dynamic Client Registration (DCR)

Event History

Jul 13, 2026
Data Sourced
via Red Hat·07:37 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2499592?

The severity of REDHAT-BUG-2499592 is classified as high, specifically rated 7 on the severity scale.

2

What is the risk associated with REDHAT-BUG-2499592?

The risk associated with REDHAT-BUG-2499592 is rated at 33.

3

How do I fix REDHAT-BUG-2499592?

To fix REDHAT-BUG-2499592, it is recommended to apply the appropriate software updates or patches released by Keycloak.

4

What does REDHAT-BUG-2499592 affect?

REDHAT-BUG-2499592 affects the Keycloak Dynamic Client Registration (DCR) functionality related to protocol mapper policies.

5

What is the root cause of REDHAT-BUG-2499592?

The root cause of REDHAT-BUG-2499592 lies in the testMappers() method of the ProtocolMappersClientRegistrationPolicy.java file.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203