REDHAT-BUG-2508306: Medium severity Keycloak secure-client-uris client policy executor vulnerability
A flaw was found in the secure-client-uris client policy executor in Keycloak. The executor permits non-HTTPS redirect URIs when allow-http-on-localhost is enabled by performing a simple string prefix check for http://localhost or http://127.0.0.1 instead of parsing the URI to validate the host component. An attacker can exploit this by registering a client via Dynamic Client Registration using a redirect URI that starts with the allowed prefix but points to an attacker-controlled domain (e.g., http://localhost.evil.test). If the policy is scoped to authorizationcode requests, it fails to block the registration or the subsequent use of the malicious URI. When a victim authenticates through the attacker's client, the authorization code is transmitted over cleartext HTTP to the attacker's server. This allows the attacker to intercept the authorization code and potentially gain unauthorized access to the victim's session.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2508306?
The severity of REDHAT-BUG-2508306 is medium, rated at 4.
What flaw does REDHAT-BUG-2508306 describe?
REDHAT-BUG-2508306 describes a flaw in Keycloak's secure-client-uris client policy executor that allows non-HTTPS redirect URIs due to improper handling of localhost URIs.
How can I mitigate the risk associated with REDHAT-BUG-2508306?
To mitigate the risk of REDHAT-BUG-2508306, ensure that the allow-http-on-localhost setting is disabled to prevent non-HTTPS redirects.
When was REDHAT-BUG-2508306 published?
REDHAT-BUG-2508306 was published on July 29, 2026.
Who is affected by REDHAT-BUG-2508306?
Users and administrators of Keycloak using the secure-client-uris client policy executor are affected by REDHAT-BUG-2508306.