CVE-2026-7504: Org.keycloak/keycloak-services: open redirect when using wildcard valid redirect uris in keycloak
A flaw was found in Keycloak's URL validation logic during redirect operations. By crafting a malicious request, an attacker could bypass validation to redirect users to unauthorized URLs, potentially leading to the exposure of sensitive information within the domain or facilitating further attacks. This vulnerability specifically affects Keycloak clients configured with a wildcard () in the "Valid Redirect URIs" field and requires user interaction to be successfully exploited.
The issue stems from a discrepancy in how Keycloak and the underlying Java URI implementation handle the user-info component of a URL. If a malicious redirect URL is constructed using multiple @ characters in the user-info section, Java's URI parser fails to extract the user-info, leaving only the raw authority field. Consequently, Keycloak's validation check fails to detect the malformed user-info, falls back to a wildcard comparison, and incorrectly permits the malicious redirect.
Other sources
Vulnerability in org.keycloak/keycloak-services
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-7504?
CVE-2026-7504 has a severity rating of 8.1, categorized as high.
How do I fix CVE-2026-7504?
To fix CVE-2026-7504, update to the latest patched version of Keycloak that addresses the open redirect vulnerability.
What impact does CVE-2026-7504 have on users?
CVE-2026-7504 can lead to unauthorized redirects, potentially exposing sensitive information or facilitating further attacks.
Which versions of Keycloak are affected by CVE-2026-7504?
CVE-2026-7504 affects versions of Keycloak that utilize wildcard valid redirect URIs without proper validation.
What types of attacks can result from CVE-2026-7504?
CVE-2026-7504 allows attackers to redirect users to malicious sites, leading to phishing attempts or credential theft.