the 253rd release
56 days (total: 9,392)
188 bug-fixes (total: 9,734)
266 commits (total: 31,427)
0 new public libcurl function (total: 93)
0 new curl_easy_setopt() option (total: 303)
0 new curl command line option (total: 258)
78 contributors, 43 new (total: 3,039)
40 authors, 19 new (total: 1,219)
2 security fixes (total: 150)
cookie mixed case PSL bypass
(CVE-2023-46218) This flaw allows a malicious HTTP server to set “super cookies” in curl that are then passed back to more origins than what is otherwise allowed or possible. This allows a site to set cookies that then would get sent to different and unrelated sites and domains.
It could do this by exploiting a mixed case flaw in curl’s function that verifies a given cookie domain against the Public Suffix List (PSL). For example a cookie could be set with
domain=co.UK when the URL used a lower case hostname
curl.co.uk, even though
co.uk is listed as a PSL domain.
HSTS long file name clears contents
(CVE-2023-46219) When saving HSTS data to an excessively long file name, curl could end up removing all contents, making subsequent requests using that file unaware of the HSTS status they should otherwise use.
We have only logged two changes for this cycle.
gnutls supports CURLSSLOPT_NATIVE_CA
If you use libcurl built to use GnuTLS, you too can now set this bit and get to use the Windows CA store directly from within libcurl instead of having to provide a separate PEM file. When your application runs on Windows. libcurl already previously support this for OpenSSL and wolfSSL.
See the CURLOPT_SSL_OPTIONS documentation for details.
HTTP3 with ngtcp2 no longer experimental
The first HTTP/3 code in curl was merged into git in 2019. Now we ship HTTP/3 support non-experimental for the first time. curl supports HTTP/3 using several different backends but this news is only for HTTP/3 built to use ngtcp2 + nghttp3. The other HTTP/3 backends remain experimental for the time being.
Note that in order to be able to use ngtcp2 you need to build with a TLS library that offers the necessary API. This means you need to use one of the following libraries: wolfSSL, quictls, BoringSSL, libressl, AWS-LC or GnuTLS. Let me stress that OpenSSL is not in that list.
As usual, here I have collected a few of my favorite fixes from this cycle.
improved IPFS and IPNS URL support
Turned out there were some IPFS URLs that curl did not manage properly.
doh: use PIPEWAIT when HTTP/2 is attempted
This makes curl prefer doing DoH requests multiplexed over a single connection rather than doing them as two separate connections. Most DoH lookups do one request for an IPv4 response and a separate one for IPv6.
duphandle: several OOM cleanups
If libcurl runs out of memory in the middle of the curl_easy_duphandle function, it could previously do several mistakes, including free-twice.
hostip: show the list of IPs when resolving is done
The verbose mode now shows the full list of IP addresses that was resolved from the name, before it continues to try to connect to them in a serial fashion.
aws-sigv4: canonicalize valueless query params
Turns out there was yet another glitch in the sigv4 logic that made curl send the wrong checksum for URLs using “valueless” query parameters.
hyper: temporarily remove HTTP/2 support
The hyper integration for HTTP/2 was incorrect and has therefore been disabled for now. hyper support in curl is still experimental.
drop vc10, vc11 and vc12 projects from dist, add vc14.20
We generate less project files for older Visual Studio versions but we added one for a recent version. Going forward, we might soon drop them completely from the tarballs since they can now be generated with cmake.
openssl: include SIG and KEM algorithms in verbose
curl now presents more details from the TLS handshake in the verbose output when using OpenSSL.
openssl: make CURLSSLOPT_NATIVE_CA import Windows intermediate CAs
The keyword here is intermediate. Previously, curl would ignore those which would lead to handshake errors because that is not what users expect when you use the native CA store.
openssl: when a session-ID is reused, skip OCSP stapling
When trying to do verify status, the more technical name for OCSP stapling, after a connection has been established using a session-ID, it would return error.
make SOCKS5 use the CURLOPT_IPRESOLVE choice
There are just too many combinations, but we find it likely that a user that asks for a specific IP version probably also wants it for the traffic over the SOCKS proxy.
tool: support bold headers in Windows
The feature that has been provided on other systems since 2018 now comes to Windows.
make the carriage return fit wide progress bars
The progress bar set with
-#/--progress-bar had its math off by one, which made it not output the carriage return character when the terminal width was wider than 256 columns, making the output wrong.
url: find scheme with a “perfect hash”
The internal function that scans the list of supported URL schemes no longer iterates through the list but instead uses a “perfect hash”. Although much faster, that was hardly a function that caused performance problems before so it is not likely to actually be measurable.
use ALPN “http/1.1” for HTTP/1.x, including HTTP/1.0
To interoperate better with legacy servers, curl now sends http/1.1 in the ALPN field even when it wants to speak HTTP/1.0. This, because http/1.1 and h2 were the original ALPN codes and some of the old servers that support ALPN from those days don’t know about http/1.0 for ALPN.
all libcurl man pages examples compile cleanly
All (almost five hundred) libcurl man pages have EXAMPLE sections showing their use. Starting now, all of those sections are test-compiled as part of the CI builds to catch mistakes.