REDHAT-BUG-2577541: Medium severity vulnerability
The OpenID Connect logout endpoint (GET
/realms/{realm}/protocol/openid-connect/logout) still applies a client's post-logout redirect URI configuration after the client has been disabled. A disabled client should be rejected with an error, as the authorization endpoint does, and its redirect allowlist should be ignored. Instead, if a disabled client was configured with a permissive post-logout redirect URI (for example "", or a redirect URI of "" with an empty post-logout redirect URI), a request for the logout endpoint with that clientid and an arbitrary postlogoutredirecturi redirects the browser to the attacker-chosen URL. When the victim has an active session, Keycloak shows the logout confirmation page first. When the victim has no active session, the browser is redirected directly, which results in an open redirect. Disabling a misconfigured client is expected to neutralize the issue, and it does not. The same behavior was confirmed on a build of main, where the redirect is also honored after the user confirms the logout.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this open redirect?
Deployments are exposed when a disabled client has a permissive post-logout redirect URI configuration, such as "*", or a redirect URI of "*" with an empty post-logout redirect URI. The logout endpoint can then honor an arbitrary post_logout_redirect_uri supplied with that client's client_id.
What does an attacker need to trigger the redirect?
The attacker needs to send a request to the OpenID Connect logout endpoint containing the disabled client's client_id and an attacker-chosen post_logout_redirect_uri. If the victim has no active session, the browser redirects directly; with an active session, Keycloak displays a logout confirmation page first.
Does disabling the affected client mitigate the issue?
No. The logout endpoint still applies the disabled client's post-logout redirect URI configuration rather than rejecting the client, so disabling a misconfigured client does not neutralize the open redirect.
What can be done before a fix is available?
Remove or tighten permissive post-logout redirect URI settings on disabled clients. In particular, avoid wildcard configurations that allow arbitrary redirect destinations.