CVE-2024-12797: RFC7250 handshakes with unauthenticated servers don't abort as expected
Issue summary: Clients using RFC7250 Raw Public Keys (RPKs) to authenticate a server may fail to notice that the server was not authenticated, because handshakes don't abort as expected when the SSLVERIFYPEER verification mode is set.
Impact summary: TLS and DTLS connections using raw public keys may be vulnerable to man-in-middle attacks when server authentication failure is not detected by clients.
RPKs are disabled by default in both TLS clients and TLS servers. The issue only arises when TLS clients explicitly enable RPK use by the server, and the server, likewise, enables sending of an RPK instead of an X.509 certificate chain. The affected clients are those that then rely on the handshake to fail when the server's RPK fails to match one of the expected public keys, by setting the verification mode to SSLVERIFYPEER.
Clients that enable server-side raw public keys can still find out that raw public key verification failed by calling SSLgetverifyresult(), and those that do, and take appropriate action, are not affected. This issue was introduced in the initial implementation of RPK support in OpenSSL 3.2.
The FIPS modules in 3.4, 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.
Other sources
pyca/cryptography's wheels include a statically linked copy of OpenSSL. The versions of OpenSSL included in cryptography 42.0.0-44.0.0 are vulnerable to a security issue. More details about the vulnerability itself can be found in https://openssl-library.org/news/secadv/20250211.txt.
If you are building cryptography source ("sdist") then you are responsible for upgrading your copy of OpenSSL. Only users installing from wheels built by the cryptography project (i.e., those distributed on PyPI) need to update their cryptography versions.
— GitHub
RFC7250 handshakes with unauthenticated servers don't abort as expected
— Microsoft
Severity: (High) Issue summary: Clients using RFC7250 Raw Public Keys (RPKs) to authenticate a server may fail to notice that the server was not authenticated, because handshakes don't abort as expected when the SSLVERIFYPEER verification mode is set. Impact summary: TLS and DTLS connections using raw public keys may be vulnerable to man-in-middle attacks when server authentication failure is not detected by clients. RPKs are disabled by default in both TLS clients and TLS servers. The issue only arises when TLS clients explicitly enable RPK use by the server, and the server, likewise, enables sending of an RPK instead of an X.509 certificate chain. The affected clients are those that then rely on the handshake to fail when the server's RPK fails to match one of the expected public keys, by setting the verification mode to SSLVERIFYPEER. Clients that enable server-side raw public keys can still find out that raw public key verification failed by calling SSLgetverifyresult(), and those that do, and take appropriate action, are not affected. This issue was introduced in the initial implementation of RPK support in OpenSSL 3.2. The FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue. OpenSSL 3.4, 3.3 and 3.2 are vulnerable to this issue. OpenSSL 3.4 users should upgrade to OpenSSL 3.4.1 once it is released. OpenSSL 3.3 users should upgrade to OpenSSL 3.3.2 once it is released. OpenSSL 3.2 users should upgrade to OpenSSL 3.2.4 once it is released. This issue was reported on 18th December 2024 by Apple Inc. The fix was developed by Viktor Dukhovni.
— Red Hat
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/cryptographyto a version that resolves this vulnerability.Fixed in 44.0.1 - Upgrade
Upgrade
debian/opensslto a version that resolves this vulnerability.Fixed in 1.1.1w-0+deb11u1Fixed in 1.1.1w-0+deb11u2Fixed in 3.0.15-1~deb12u1Fixed in 3.0.14-1~deb12u2Fixed in 3.4.1-1 - Upgrade
Upgrade
OpenSSL 3.2to a version that resolves this vulnerability.Fixed in 3.2.4 - Upgrade
Upgrade
OpenSSL 3.3to a version that resolves this vulnerability.Fixed in 3.3.2 - Upgrade
Upgrade
OpenSSL 3.4to a version that resolves this vulnerability.Fixed in 3.4.1 - Upgrade
Upgrade
cryptography (pyca/cryptography) bundled OpenSSLto a version that resolves this vulnerability.Patch CVE-2024-12797
Event History
Frequently Asked Questions
What is the severity of CVE-2024-12797?
CVE-2024-12797 is considered a high severity vulnerability due to the potential for unauthenticated server connections.
How do I fix CVE-2024-12797?
To mitigate CVE-2024-12797, ensure that the SSL_VERIFY_PEER verification mode is set correctly during TLS handshakes.
What impact does CVE-2024-12797 have on OpenSSL versions?
CVE-2024-12797 affects OpenSSL versions from 3.2 up to, but not including, 3.4.
What type of authentication is affected by CVE-2024-12797?
CVE-2024-12797 impacts clients using RFC7250 Raw Public Keys for server authentication.
When was CVE-2024-12797 disclosed?
CVE-2024-12797 was disclosed on February 11, 2025.