CVE-2026-18217: Keycloak-services: keycloak-services: saml http-redirect binding response preserves query string leading to parameter pollution
A flaw was found in the SAML protocol implementation of Keycloak, an open-source identity and access management solution. The issue occurs when Keycloak handles SAML authentication requests using the HTTP-Redirect binding. If a client is configured with a wildcard redirect URL, an attacker can craft a request that includes malicious parameters. When a user authenticates, Keycloak appends its legitimate response to the attacker's parameters. This can cause some service providers to process the attacker's data instead of the real login information, potentially leading to a user being logged into the wrong account.
Other sources
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.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-18217?
The severity of CVE-2026-18217 is rated as low with a score of 3.4.
What does CVE-2026-18217 affect?
CVE-2026-18217 affects the SAML protocol implementation in Keycloak, specifically during HTTP-Redirect binding.
How can I fix CVE-2026-18217?
To fix CVE-2026-18217, ensure that the redirect URLs configured in Keycloak do not use wildcards.
What type of vulnerability is CVE-2026-18217?
CVE-2026-18217 is categorized under input validation vulnerabilities with a potential for parameter pollution.
What is the risk associated with CVE-2026-18217?
CVE-2026-18217 poses a risk of parameter pollution due to improper handling of query strings in SAML HTTP-Redirect bindings.