Fedora Account System
Red Hat Associate
Red Hat Customer
A flaw was found in Keycloak where an authenticated attacker with delegated client management permissions (manage-clients) can achieve arbitrary code execution. When a client is created with authorization services enabled and an authorizationSettings payload is provided in the same request, Keycloak sets an internal session attribute to allow the creation of a default policy but fails to clear it. This mechanism can be abused to supply an inline JavaScript policy during client import, bypassing the security control that normally disables script uploads. When the policy is subsequently evaluated during a User-Managed Access (UMA) authorization request, the injected JavaScript executes within the Keycloak server JVM process. This allows an attacker to escape the delegated administrator's realm boundary and perform actions such as reading sensitive host data, modifying configurations for other realms, or causing a complete system shutdown.