CVE-2023-6134 Keycloak: reflected xss via wildcard in oidc redirect_uri
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.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-services Maven | All versions | 23.0.3 |
org.keycloak:keycloak-services Maven | All versions | 23.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.
Other vulnerabilities in Redhat Keycloak
- CVE-2022-4361 Keycloak vulnerable to cross-site scripting when validating URI-schemes on SAML and OIDC
- CVE-2022-1245 Keycloak vulnerable to privilege escalation on Token Exchange feature
- CVE-2021-20195 keycloak Self Stored Cross-site Scripting vulnerability
- CVE-2019-14910 Keycloak Authentication Error
- CVE-2019-14909 Keycloak Authentication Error
Sources
Also known as GHSA-cvg2-7c3j-g36j.