Skip to content
Crypto Disclosed report Intermediate

wolfSSL Backend Silently Ignores --cert-status (OCSP Stapling Bypass)

When curl is built with the wolfSSL backend, the --cert-status option is accepted but silently ignored, so OCSP stapling is never checked. A server presenting a revoked certificate that OCSP would flag is accepted without any warning to the user.

sheldonholmes Follow

Originally disclosed on HackerOne

  • Disclosed after 19 hours

Summary

When curl is built with the wolfSSL TLS backend, --cert-status (CURLOPT_SSL_VERIFYSTATUS) is silently accepted and ignored. The wolfSSL backend sets cert_status_request = NULL in its vtable (lib/vtls/wolfssl.c:2309), meaning OCSP stapling is not implemented. The curl_easy_setopt() call returns CURLE_NOT_BUILT_IN, but the CLI tool at src/config2setopts.c:442 discards this return value — the user gets no error, no warning, and the connection proceeds without OCSP verification.

This is confirmed exploitable on the HTTP/3 (QUIC) path where a server providing no OCSP staple is accepted despite --cert-status being set.

Root Cause (

Layer 1 — wolfSSL backend lacks OCSP support: lib/vtls/wolfssl.c:2309 — vtable entry:

C
NULL,                            /* cert_status_request */

Zero references to verifystatus or OCSP anywhere in wolfssl.c. Compare with OpenSSL (6 references) and GnuTLS (4 references).

Layer 2 — CLI silently drops the error: src/config2setopts.c:441-442:

C
if(config->verifystatus)
    my_setopt_long(curl, CURLOPT_SSL_VERIFYSTATUS, 1);

my_setopt_long expands to curl_easy_setopt() and the CURLE_NOT_BUILT_IN return is discarded. No warning printed, no error to the user.

Layer 3 — QUIC path also has no check: lib/vquic/vquic-tls.c:169-186 — wolfSSL QUIC verification checks verifyhost (line 171) and pinned key (line 186) but has no verifystatus check, even as a "not supported" error.

Proof of Concept

Docker container: curl 8.23.1-DEV built with wolfSSL 5.9.4, ngtcp2 1.8.1, nghttp3 1.6.0. QUIC server: ngtcp2 wsslserver example (no OCSP staple configured).

Test A: H3 without --cert-status (control)

curl --http3-only --insecure https://127.0.0.1:4434/
→ exit:0 http:404 (works as expected)

Test B: H3 WITH --cert-status (VULNERABILITY)

curl --http3-only --insecure --cert-status https://127.0.0.1:4434/
→ exit:0 http:404

Server provides NO OCSP staple. --cert-status is set but silently ignored. Full HTTP/3 connection succeeds:

* SSL connection using TLSv1.3 / TLS13-AES128-GCM-SHA256
* [HTTP/3] [0] OPENED stream for https://127.0.0.1:4435/
> GET / HTTP/3
< HTTP/3 404

Expected behavior: Either reject the connection with CURLE_SSL_INVALIDCERTSTATUS, or error at startup with "OCSP stapling not supported with this TLS backend."

Suggested Fix

Option A (minimal): Make config2setopts.c check the return value and warn/error:

C
if(config->verifystatus) {
    result = my_setopt_long(curl, CURLOPT_SSL_VERIFYSTATUS, 1);
    if(result == CURLE_NOT_BUILT_IN) {
        warnf(global, "OCSP stapling not supported by this TLS backend");
        return result;
    }
}

Option B (complete): Add verifystatus check to the wolfSSL QUIC path at vquic-tls.c:

C
if(conn_config->verifystatus) {
    failf(data, "OCSP stapling not supported with wolfSSL QUIC");
    return CURLE_SSL_INVALIDCERTSTATUS;
}

Impact

  1. User sets --cert-status expecting OCSP stapling enforcement — it is silently ignored
  2. A revoked certificate that would be caught by OCSP is accepted without warning
  3. Applications using CURLOPT_SSL_VERIFYSTATUS with wolfSSL have a false sense of security
  4. The silent failure is worse than a crash — the user believes they have OCSP protection when they do not

The original report as published on HackerOne, by sheldonholmes. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Root cause

The wolfSSL backend does not implement OCSP status checking, and the command-line option handler discards the 'not built in' error instead of reporting it.

Impact

A revoked certificate that OCSP would catch is accepted without warning, giving users and applications a false sense of security; the report notes the silent failure is worse than a crash.

What the attacker needed

Curl built with the wolfSSL backend; user passes --cert-status; server omits an OCSP staple

The fix

The option handler should check the return value and warn or error when OCSP stapling is unsupported, and the wolfSSL QUIC path should also reject the connection with an invalid-certificate-status error.

How it was found

  1. Build curl with the wolfSSL backend and run a QUIC test server that provides no OCSP staple.
  2. Connect over HTTP/3 without --cert-status as a control and observe a normal response.
  3. Repeat the connection with --cert-status set and observe that it still succeeds with no error.

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 stapling is a way for a website to prove its certificate has not been revoked, and curl's --cert-status option asks for that proof. With one particular TLS library (wolfSSL), curl accepts the option but never actually checks the proof, and it does not tell you. So you think you are protected against revoked certificates when you are not.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from curl

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.