CVE-2023-1664 Keycloak Untrusted Certificate Validation vulnerability
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.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-core Maven | All versions | 21.1.2 |
org.keycloak:keycloak-core Maven | All versions | 21.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.
Other vulnerabilities in Redhat Keycloak
- CVE-2022-4492 Undertow client not checking server identity presented by server certificate in https connections
- CVE-2023-2974 quarkus-core vulnerable to client driven TLS cipher downgrading
- CVE-2021-3914 SmallRye Health UI Cross-site Scripting vulnerability
- CVE-2023-6393 Quarkus: potential invalid reuse of context when @cacheresult on a uni is used
- CVE-2021-3536 Cross-site Scripting in Wildfly
Sources
Also known as GHSA-5cc8-pgp5-7mpm.