CVE-2023-6291 Keycloak: redirect_uri validation bypass

High 7.1 Published Updated

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.

PackageAffectedFixed in
org.keycloak:keycloak-services MavenAll versions23.0.3
org.keycloak:keycloak-services MavenAll versions23.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.

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-mpwq-j3xf-7m5w.

Is CVE-2023-6291 in your software?

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

Check your SBOMs for free