CVE-2026-137431 in Keycloak Single Sign-On
Summary
by MITRE • 11/26/2026
A flaw was found in the keycloak-services component of Keycloak, which is used to handle OpenID Connect authentication flows. The issue occurs because the security check that prevents attackers from pre-seeding security parameters in a redirect URL can be bypassed by adding an extra question mark character to the parameter name. This allows an attacker to trick a user's browser into using an attacker-controlled login code. As a result, a victim may be unknowingly logged into an attacker's account, leading to account confusion or the exposure of sensitive data entered by the victim.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/26/2026
The vulnerability identified in the keycloak-services component of Keycloak represents a critical authentication bypass flaw within the OpenID Connect implementation. This security issue stems from an insufficient validation mechanism designed to prevent open redirect attacks and parameter pollution during the authorization code flow. Specifically, the system fails to adequately sanitize or validate query parameters when processing redirection URLs, allowing attackers to manipulate the state of the authentication transaction. The core technical failure lies in how the application parses incoming request data, where a subtle deviation from expected input formats can circumvent existing security controls that are intended to ensure the integrity and origin of redirect targets.
The specific mechanism exploited involves the manipulation of parameter names by appending an extra question mark character. In standard URL parsing logic, this anomaly causes the browser or intermediate proxies to treat subsequent parameters differently than anticipated by the application server. By injecting a malformed query string structure, an attacker can effectively bypass checks that are supposed to prevent pre-seeding security parameters such as state tokens or redirect URIs with malicious values. This technique allows the attacker to inject their own login code into the authentication flow, tricking the victim's browser into accepting credentials intended for a different context. The flaw relies on the ambiguity in how certain parsers handle malformed query strings versus standard ones, creating a gap between the developer's intent and the runtime behavior of the security checks.
The operational impact of this vulnerability is severe, primarily affecting user account integrity and data confidentiality. When successful, an attacker can force a victim to authenticate using credentials that belong to the attacker or another malicious entity. This results in account confusion where the victim believes they are logging into their own service but is actually interacting with an environment controlled by the adversary. Furthermore, this misdirection can lead to the exposure of sensitive data entered during subsequent interactions, as the victim may input personal information, financial details, or corporate credentials under the false assumption that they are on a legitimate page. This type of attack undermines trust in the identity provider and can facilitate further phishing campaigns or credential harvesting efforts by establishing a foothold through compromised sessions.
To mitigate this risk, immediate updates to the Keycloak platform should be prioritized if available patches exist for the affected versions. Administrators must ensure that all instances are running the latest stable release which includes fixes for these parameter validation issues. In addition to software updates, implementing strict Content Security Policy headers and enforcing rigorous input validation on redirect URLs can provide additional layers of defense. It is also advisable to review logging mechanisms to detect anomalies in query string patterns that resemble this exploitation technique. Organizations should conduct regular security audits focusing on authentication flows and ensure that developers adhere to secure coding practices that validate all user-supplied inputs against expected formats before processing them within critical security contexts such as OpenID Connect exchanges.