REDHAT-BUG-2508311: CSRF
A HTTP Parameter Pollution vulnerability was discovered in Keycloak within the org.keycloak.protocol.saml package. The flaw exists because the SAML HTTP-Redirect binding response preserves the full query string provided in the initial authentication request. An attacker can craft an AuthnRequest with an AssertionConsumerServiceURL that already contains SAMLResponse and RelayState query parameters. If the SAML client is configured with a wildcard redirect URI and allows the attacker to control these parameters, Keycloak will append its own SAML binding parameters to the existing ones in the redirect response. This results in duplicate parameters where the attacker-controlled values appear first. An attacker can exploit this against service providers that only parse the first occurrence of a query parameter to perform login CSRF or session swapping, effectively forcing a victim to authenticate into an attacker-controlled session.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2508311?
The severity of REDHAT-BUG-2508311 is classified as medium, rated at 4.
What vulnerability type is REDHAT-BUG-2508311?
REDHAT-BUG-2508311 is classified as a HTTP Parameter Pollution vulnerability.
How does the REDHAT-BUG-2508311 vulnerability occur?
The REDHAT-BUG-2508311 vulnerability occurs due to the SAML HTTP-Redirect binding response preserving the full query string from the initial authentication request.
Who is affected by the REDHAT-BUG-2508311 vulnerability?
The REDHAT-BUG-2508311 vulnerability affects users of Keycloak, specifically within the org.keycloak.protocol.saml package.
What is a potential impact of REDHAT-BUG-2508311?
An attacker can exploit REDHAT-BUG-2508311 by crafting an AuthnRequest that could lead to session hijacking or unauthorized accesses.