The vulnerability lies in the SAML ECP endpoint implementation in Keycloak, specifically in how it handles errors during the authentication process. The authenticate method in org.keycloak.protocol.saml.profile.ecp.SamlEcpProfileService processes incoming SOAP requests.
The patch analysis reveals that within this method, an anonymous inner class is used to handle protocol binding. This inner class overrides an error method. In the vulnerable version, this error method would create a SOAP fault response where the fault's "reason" was populated with a detailed error message (message).
The vulnerability arises because this message could contain sensitive information about the server's state or the configuration of the client being targeted. By sending crafted requests with different client IDs, an attacker could trigger different error conditions and inspect the fault reasons in the SOAP responses to infer information, such as whether a client exists and what its protocol settings are.
The fix replaces the detailed, variable error message in the SOAP fault with a static, generic message: "Authentication request cannot be processed.". The original detailed message is now only logged on the server side for debugging purposes.
Therefore, the authenticate function is the key function that would appear in a runtime profile when this vulnerability is triggered, as it is the entry point for the vulnerable logic that generates the information-leaking error response.