Bug 2584738 (CVE-2026-137431)

Summary: CVE-2026-137431 keycloak-services: keycloak-services: leading ? in a redirect_uri parameter name bypasses the forbidden OIDC parameter check
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aschwart, aszczucz, boliveir, drichtar, mposolda, pjindal, rmartinc, ssilvert, sthorger, vmuzikar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-11-26 10:59:00 UTC
A flaw was found in the RedirectUtils.containsForbiddenOidcParameters method of Keycloak. Keycloak is designed to reject authorization requests where the redirect_uri contains forbidden OIDC response parameters (such as code, state, iss, or session_state) to prevent parameter injection. However, the validation logic performs a literal string comparison that fails to account for a leading ? character in the parameter name.
An attacker can exploit this by crafting a redirect_uri such as https://good.example/cb??code=EVIL&__atl_rovo=disable_public_resolution. Because the parameter name is seen as ?code instead of code, it bypasses the forbidden parameter check. When the server appends its own parameters after a successful login, the attacker-supplied value appears first. Browser-based clients that strip the leading ? and read the first occurrence of a parameter will obtain the attacker's value. This enables a login CSRF or account confusion attack where a victim ends up logged into the attacker's account. This is an incomplete fix for CVE-2026-9689 and CVE-2026-18209.