CVE-2024-0853: OCSP verification bypass with TLS session reuse
cURL 8.5.0 skips OCSP stapling verification when reusing a TLS session, so a revoked certificate can be accepted on a second request to the same host. An attacker with a revoked certificate could have it treated as valid after an initial failed check.
- Disclosed after 33 days
Summary:
In version 8.5.0, cURL has inadvertently established a pathway for accepting revoked certificates. As a result of this correction, during TLS session reuse, OCSP stapling verification will be skipped. However, the TLS session will be preserved regardless of OCSP verification results. As a result, even for revoked certificates, verification is skipped during TLS session reuse.
Steps To Reproduce:
1.Identify sites with revoked certificates.
2. curl (1.URL) (1.URL)--cert-status
I have prepared an environment for testing. Please use as necessary.
https://ocsptest.ddns.net/
curl https://ocsptest.ddns.net/ https://ocsptest.ddns.net/ --cert-status
This website returns only the string "test."
- I have used this for testing.
- To avoid complications with timing dependencies in verification, I have configured the web server to use TLS 1.2. In the case of TLS 1.3, the timing of session preservation is delayed, which appeared to prevent session reuse with the above command line.
Here are the execution results.
C:\curl-8.5.0_3-win64-mingw\bin>curl https://ocsptest.ddns.net/ https://ocsptest.ddns.net/ --cert-status
curl: (91) SSL certificate revocation reason: (UNKNOWN) (-1)
test
The first request becomes error, but the second one unjustly passes through the normal case.
Impact
Bypassing OCSP verification.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could bypass OCSP verification and have a revoked certificate accepted on a reused TLS session.
What the attacker needed
CURL version 8.5.0; a server with a revoked certificate; TLS session reuse (e.g., TLS 1.2)
How it was found
- Find a site with a revoked certificate.
- Run curl with the --cert-status option against that site twice in one command.
- Observe that the first request fails with a revocation error but the second request succeeds.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
OCSP is a way for a browser or tool to check online whether a certificate has been revoked. cURL 8.5.0 had a bug where, if it reused an existing secure connection (TLS session), it forgot to do that revocation check. So a certificate that should have been rejected could be accepted on a later request.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.