CVE-2023-6134 Keycloak: reflected xss via wildcard in oidc redirect_uri

Medium 4.6 Published Updated

Attackers can execute arbitrary scripts in victim browsers via crafted OIDC redirect URIs, potentially leading to session hijacking or account takeover.

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

What is CVE-2023-6134?

CVE-2023-6134 is a medium-severity cross-site scripting vulnerability in Redhat Keycloak, published on 14 Dec 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

A flaw was found in Keycloak that prevents certain schemes in redirects, but permits them if a wildcard is appended to the token. This issue could allow an attacker to submit a specially crafted request leading to cross-site scripting (XSS) or further attacks. This flaw is the result of an incomplete fix for CVE-2020-10748.

Weakness: CWE-79

Which versions are affected by CVE-2023-6134?

2 open source packages ship an affected version, including org.keycloak:keycloak-services. It affects 5 products.

PackageAffectedFixed in
org.keycloak:keycloak-services MavenAll versions23.0.3
org.keycloak:keycloak-services MavenAll versions23.0.3

Products include Redhat Keycloak, Redhat Openshift Container Platform, Redhat Openshift Container Platform for Power, Redhat Openshift Container Platform Ibm Z Systems, Redhat Single Sign-On.

How do I fix CVE-2023-6134?

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

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2023-6134 being exploited?

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

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-cvg2-7c3j-g36j.

Is CVE-2023-6134 in your software?

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

Check your SBOMs for free