CVE-2025-5025: No QUIC certificate pinning with wolfSSL
When curl uses wolfSSL as its TLS backend and connects over HTTP/3, the pinned public key check is never performed, so a connection succeeds even when the server's key does not match the pin. An attacker able to intercept traffic could therefore present a different certificate and bypass the pinning protection that the user expected.
- Triaged in 16 hours
- Fixed in 9 days
- Disclosed after 9 days
Summary:
When using wolfSSL as the TLS backend, certificate pinning does not work when using HTTP/3.
The code should invoke wssl_verify_pinned(), but it has not been implemented.
Affected version
# curl -V
WARNING: this libcurl is Debug-enabled, do not use in production
curl 8.13.0 (x86_64-pc-linux-gnu) libcurl/8.13.0 wolfSSL/5.8.0 zlib/1.3.1 libidn2/2.3.8 libpsl/0.21.2 ngtcp2/1.13.0-DEV nghttp3/1.1
Release-Date: 2025-04-02
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS Debug HSTS HTTP3 HTTPS-proxy IDN IPv6 Largefile libz PSL SSL threadsafe TrackMemory UnixSockets
Steps To Reproduce:
I will explain using a connection to google.com as an example.
- Prepare curl with WolfSSL backend.
- curl --http3 https://google.com --pinnedpubkey sha256//ffff
It should result in an error because the specified public key and the certificate's public key are different, but no error occurs.
An error occurs when using HTTP/1.1. An error occurs when the TLS backend is OpenSSL or GnuTLS.
Impact
Bypassing Certificate Pinning.
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
Likely the wolfSSL HTTP/3 code path never calls the function that verifies the pinned public key, so the check is simply absent for QUIC connections.
Impact
Certificate pinning can be bypassed over HTTP/3 with wolfSSL, though the flaw only affects that specific backend and protocol combination; HTTP/1.1 and the OpenSSL and GnuTLS backends still reject the mismatched pin.
What the attacker needed
Curl built with wolfSSL and HTTP/3; attacker able to intercept the connection
How it was found
- Build or obtain curl with the wolfSSL backend.
- Run curl over HTTP/3 against a host while supplying a pinned public key that does not match the server's key.
- Observe that the connection succeeds instead of failing.
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.
Certificate pinning is a way for a program to say 'only trust this exact key for this server', so even a valid certificate from someone else is rejected. Here, when curl talks over the newer HTTP/3 protocol using one particular TLS library (wolfSSL), that check is skipped entirely. That means someone sitting between the user and the server could use their own certificate and curl would not notice.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.