OpenSSL has addressed a critical vulnerability, CVE-2024-12797, which was discovered by Apple researchers. This flaw affects TLS clients using raw public keys (RPKs) and allows for man-in-the-middle (MitM) attacks due to improper server authentication checks in SSL_VERIFY_PEER mode. The vulnerability was reported on December 18, 2024, and has since been patched in OpenSSL versions 3.2.4, 3.3.2, and 3.4.1. It specifically impacts clients that enable RPKs on both the server and client sides, where authentication failures were not detected.
The vulnerability arises when a client explicitly enables the use of RPKs and the server does the same, instead of using the more common X.509 certificate chains. In this scenario, the handshake would fail if the raw public key does not match any of the expected public keys. However, clients can still verify the failure of raw public key verification by calling SSL_get_verify_result(). While the issue is critical, it only affects clients that manually configure RPKs, as these are disabled by default in OpenSSL for both TLS clients and servers.
This flaw was introduced during the initial implementation of RPK support in OpenSSL 3.2, and while the attack complexity is high, it poses a serious risk if left unpatched. The vulnerability enables attackers to exploit insecure communications, compromising confidentiality and integrity. OpenSSL urged users to update to the latest versions to mitigate potential risks. The vulnerability’s scope emphasizes the importance of strong authentication mechanisms and secure key verification during encrypted communications.
In addition to addressing CVE-2024-12797, OpenSSL has been actively releasing patches for other critical flaws, including the CVE-2022-3602 and CVE-2022-3786 vulnerabilities that were disclosed in late 2022. These previous flaws involved buffer overflows in X.509 certificate verification, which could lead to remote code execution or denial of service. OpenSSL’s continuous focus on security ensures that users can maintain safe communication channels, and organizations are strongly advised to keep their systems updated to avoid potential attacks.