Please donate a few minutes of your time to the curl user survey 2025
curl / Docs / curl CVEs / No QUIC certificate pinning with wolfSSL
Awarded 2540 USD

CVE-2025-5025

No QUIC certificate pinning with wolfSSL

Project curl Security Advisory, May 28 2025 - Permalink

VULNERABILITY

libcurl supports pinning of the server certificate public key for HTTPS transfers. Due to an omission, this check is not performed when connecting with QUIC for HTTP/3, when the TLS backend is wolfSSL.

Documentation says the option works with wolfSSL, failing to specify that it does not for QUIC and HTTP/3.

Since pinning makes the transfer succeed if the pin is fine, users could unwittingly connect to an impostor server without noticing.

INFO

curl can get built to use one out of twelve different TLS libraries. The selection is done both at build-time and also optionally at runtime. This vulnerability only affects curl made to use this specific TLS backend.

This flaw requires wolfSSL to be used as the TLS backend for QUIC to trigger.

The pinning option still works fine with wolfSSL for TCP-based TLS, meaning for HTTP/1 and HTTP/2.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2025-5025 to this issue.

CWE-295: Improper Certificate Validation

Severity: Medium

AFFECTED VERSIONS

Beware that while curl versions before 8.5.0 are not strictly considered vulnerable to this flaw, certificate pinning for QUIC with wolfSSL did not work correctly then either but before then HTTP/3 support was labeled experimental and not presumed to work 100%.

libcurl is used by many applications, but not always advertised as such!

This bug is not considered a C mistake. It is not likely to have been avoided had we not been using C.

This flaw also affects the curl command line tool.

SOLUTION

Starting in curl 8.14.0, this mistake is fixed.

RECOMMENDATIONS

A - Upgrade curl to version 8.14.0

B - Apply the patch to your local version

C - Avoid using HTTP/3 or certificate pinning with curl built to use wolfSSL

TIMELINE

This issue was reported to the curl project on May 19, 2025. We contacted distros@openwall on May 22, 2025.

curl 8.14.0 was released on May 28 2025 around 07:00 UTC, coordinated with the publication of this advisory.

The curl security team is not aware of any active exploits using this vulnerability.

CREDITS

Thanks a lot!