CVE-2023-1664 Keycloak Untrusted Certificate Validation vulnerability

Medium 6.5 Published Updated

Attackers can bypass client certificate validation in Keycloak if specific non-default configurations are misconfigured, potentially compromising integrity or confidentiality.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-1664?

CVE-2023-1664 is a medium-severity vulnerability in Redhat Keycloak, published on 26 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in Keycloak. This flaw depends on a non-default configuration "Revalidate Client Certificate" to be enabled and the reverse proxy is not validating the certificate before Keycloak. Using this method an attacker may choose the certificate which will be validated by the server. If this happens and the KC_SPI_TRUSTSTORE_FILE_FILE variable is missing/misconfigured, any trustfile may be accepted with the logging information of "Cannot validate client certificate trust: Truststore not available". This may not impact availability as the attacker would have no access to the server, but consumer applications Integrity or Confidentiality may be impacted considering a possible access to them. Considering the environment is correctly set to use "Revalidate Client Certificate" this flaw is avoidable.

Weakness: CWE-295

Which versions are affected by CVE-2023-1664?

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

PackageAffectedFixed in
org.keycloak:keycloak-core MavenAll versions21.1.2
org.keycloak:keycloak-core MavenAll versions21.1.2

Products include Redhat Build of Quarkus, Redhat Jboss A-Mq, Redhat Keycloak, Redhat Migration Toolkit for Runtimes, Redhat Single Sign-On.

How do I fix CVE-2023-1664?

Upgrade org.keycloak:keycloak-core to 21.1.2 or later.

Is CVE-2023-1664 being exploited?

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

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-5cc8-pgp5-7mpm.

Is CVE-2023-1664 in your software?

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

Check your SBOMs for free