Improper Certificate Validation in Keycloak - CVE-2023-1664

 

Improper Certificate Validation in Keycloak - CVE-2023-1664

Published: June 28, 2023 / Updated: June 28, 2023


Vulnerability identifier: #VU77752
CSH Severity: Medium
CVSS v4: 6.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2023-1664
CWE-ID: CWE-295
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to bypass client certificate validation.

The vulnerability exists due to improper certificate validation when using X509 Client Certificate Authenticatior with the option "Revalidate Client Certificate". A remote attacker with ability to directly connect to Keycloak (e.g. not via the reverse proxy) can bypass certificate validation and gain unauthorized access to the application.

Successful exploitation of the vulnerability requires that there's a configuration error in KC_SPI_TRUSTSTORE_FILE_FILE, which results in accepting any certificate with the logging information of "Cannot validate client certificate trust: Truststore not available".


Affected software

Keycloak
Red Hat Single Sign-On
AMQ Broker
IBM i Modernization Engine for Lifecycle Integration
rh-sso7-keycloak (Red Hat package)

How to mitigate CVE-2023-1664

Install update from vendor's website.

Keycloak - update to 21.1.2
AMQ Broker - update to 7.11.2
Red Hat Single Sign-On - update to 7.6.4
IBM i Modernization Engine for Lifecycle Integration - update to 1.4.4
rh-sso7-keycloak (Red Hat package) - addressed in versions 18.0.8-1.redhat_00001.1.el7sso, 18.0.8-1.redhat_00001.1.el8sso, 18.0.8-1.redhat_00001.1.el9sso

External References

Related Security Bulletins