Fedora Account System
Red Hat Associate
Red Hat Customer
A vulnerability was found in Keycloak where the SAML identity provider brokering mechanism fails to perform a case-sensitive validation of the asserted subject. When a realm brokers logins from a SAML identity provider, Keycloak looks up the federated identity link using a plain database equality query against the FEDERATED_USER_ID column. If the underlying database uses a case-insensitive collation, a signed SAML assertion containing a subject that differs only in case (e.g., Alice vs alice) will resolve to the same federated identity link. Keycloak does not perform a secondary case-sensitive check on the returned value. An attacker can exploit this to obtain a valid access token for a victim's account, effectively bypassing authentication for the intended user.