Fedora Account System
Red Hat Associate
Red Hat Customer
A response discrepancy information leak was discovered in the Keycloak Admin REST API v2 clients endpoint. The root cause is the order of operations in the path resolver and the update function. When a PUT request is sent to /admin/api/{realm}/clients/v2/{target-id}, the server validates the consistency of the clientId in the request body against the target-id in the URL before performing the per-client authorization check. If an authenticated attacker with no client view or manage permissions sends a PUT request where the body contains a different clientId than the URL path, the server returns a 400 Bad Request if the target-id exists in the database. If the target-id does not exist, the path resolver fails earlier and returns a 403 Forbidden. This discrepancy allows an attacker to reliably enumerate or confirm the existence of client IDs within a realm.