OpenSSL Vulnerability: Server Authentication Failure with Raw Public Keys
Summary
DEBIAN-CVE-2024-12797: 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 SSL_VERIFY_PEER verificat... Affects openssl versions < 3.4.1-1. Fixed in 3.4.1-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
OpenSSL is a widely used cryptographic library that provides secure communication over networks. It supports various encryption protocols, including TLS and DTLS, and is essential for establishing secure connections. The library's implementation of Raw Public Keys (RPKs) allows clients to authenticate servers using public keys instead of traditional X.509 certificates. However, this feature can lead to vulnerabilities if not properly managed, particularly when server authentication fails without detection.
Vulnerability Detail
The vulnerability arises from the handling of Raw Public Keys (RPKs) in OpenSSL, specifically when clients use the SSL_VERIFY_PEER verification mode. If a server fails to authenticate, the handshake does not abort as expected, potentially allowing man-in-the-middle attacks. This issue was introduced in the initial implementation of RPK support in OpenSSL 3.2. Clients that enable RPKs must ensure they handle verification failures correctly to avoid security risks.
How To Fix
Minimum fixed version
3.4.1-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade openssl
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, clients can call SSL_get_verify_result() after the handshake to check if the raw public key verification failed. This allows clients to take appropriate action even if the handshake does not abort as expected.
Conclusion
The OpenSSL vulnerability related to Raw Public Keys poses significant risks for server authentication. It is crucial for users to update to the latest patched version to mitigate these risks. Additionally, implementing workarounds can help manage the vulnerability until an update is applied.
See every vulnerability recorded for openssl →
FAQ
The vulnerability can lead to man-in-the-middle attacks if server authentication failures are not detected by clients using Raw Public Keys.
OpenSSL versions 3.2 to 3.4.0 are affected by this vulnerability. The issue is fixed in version 3.4.1-1.
You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, you can check for vulnerabilities without needing to install anything.
If an immediate update is not possible, ensure that your application checks the result of SSL_get_verify_result() after handshakes to handle potential verification failures.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
References
Related vulnerabilities
Recent vulnerabilities recorded for openssl.