CVE-2023-6291 Keycloak: redirect_uri validation bypass
Attackers can bypass redirect_uri validation to steal access tokens and impersonate users in Keycloak deployments.
- 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-2023-6291?
CVE-2023-6291 is a high-severity vulnerability in Redhat Keycloak, published on 26 Jan 2024. 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 the redirect_uri validation logic in Keycloak. This issue may allow a bypass of otherwise explicitly allowed hosts. A successful attack may lead to an access token being stolen, making it possible for the attacker to impersonate other users.
Weakness: CWE-601
Which versions are affected by CVE-2023-6291?
2 open source packages ship an affected version, including org.keycloak:keycloak-services. It affects 7 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 Migration Toolkit for Applications, Redhat Openshift Container Platform, Redhat Openshift Container Platform for Ibm Z, Redhat Openshift Container Platform for Linuxone, Redhat Openshift Container Platform for Power and 1 more.
How do I fix CVE-2023-6291?
Upgrade org.keycloak:keycloak-services to 23.0.3 or later.
Is CVE-2023-6291 being exploited?
There is no known exploitation of CVE-2023-6291 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-mpwq-j3xf-7m5w.