A flaw was found in Keycloak. This vulnerability enables information disclosure when the parameterized-scopes feature is enabled. The protocol mapper fails to enforce authorization checks for certain scope parameter types during token and authorization requests. An authenticated remote attacker can exploit this flaw by supplying a crafted scope parameter to retrieve sensitive profile attributes of other users without authorization.
To mitigate this vulnerability, disable the preview feature or remove affected protocol mappers:
- Disable the parameterized scopes capability by avoiding preview feature activation, or explicitly disable it at startup using the option
--features-disabled=parameterized-scopes or the environment variable KC_FEATURES_DISABLED=parameterized-scopes.
- Alternatively, in the Keycloak Administration Console, review configured Client Scopes across realms and delete or reconfigure any "Parameterized Scope User Property" protocol mappers.
Warning: Modifying server configuration flags or environment variables requires restarting the Keycloak service, which will temporarily interrupt authentication services.