The vulnerability is a Denial of Service in Keycloak's SAML processing component. An unauthenticated attacker can send a specially crafted, malformed SAML 1.1 XML document to a SAML endpoint. This triggers a flaw in the XML parsing logic, causing an infinite loop and high CPU consumption, which ultimately makes the server unresponsive.
The root cause of the vulnerability lies in several parsing methods within the org.keycloak.saml.processing.core.parsers.util.SAML11ParserUtil class. The analysis of the fixing commit be84d28ce4c69c038d542f11405d5ede1d61f4a9 shows that functions responsible for parsing specific SAML 1.1 elements (SubjectConfirmation, AttributeQuery, AuthenticationQuery, and AuthorizationDecisionQuery) did not properly handle cases where unexpected text content was present instead of the expected XML child elements. This led to a state where the XML event parser would not advance, resulting in an infinite loop within the parsing function.
The patch rectifies this by adding a crucial else block to the parsing loop. This block checks for unexpected XML event types and throws a ParsingException if one is found, thus terminating the process and preventing the Denial of Service. The identified vulnerable functions are the ones that contained this flawed parsing logic and would appear in a runtime profile with high CPU usage during an exploit.