CVE-2026-7504 Org.keycloak/keycloak-services: open redirect when using wildcard valid redirect uris in keycloak

High 8.1 Published Updated

Attackers can bypass redirect validation in Keycloak clients using wildcard URIs to redirect users to malicious sites, potentially exposing sensitive information.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-7504?

CVE-2026-7504 is a high-severity vulnerability in Redhat Build of Keycloak, published on 19 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-601

Which versions are affected by CVE-2026-7504?

3 open source packages ship an affected version, including org.keycloak:keycloak-services and keycloak. It affects 1 product.

PackageAffectedFixed in
org.keycloak:keycloak-services MavenAll versions26.6.2
org.keycloak:keycloak-services MavenAll versions26.6.2
keycloak BitnamiFrom 26.4.026.4.12

Products include Redhat Build of Keycloak.

How do I fix CVE-2026-7504?

Upgrade org.keycloak:keycloak-services to 26.6.2 or later.

Is CVE-2026-7504 being exploited?

There is no known exploitation of CVE-2026-7504 in the wild and no public exploit code.

All Redhat Build of Keycloak vulnerabilities

Sources

Also known as BIT-keycloak-2026-7504, ECHO-a405-9171-9ba2, GHSA-rp95-xpg9-c2cq, MINI-2688-w869-7qhj, MINI-469j-qc6f-4j26.

Is CVE-2026-7504 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free