curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

curl: CVE-2023-23914: HSTS ignored on multiple requests

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 15 Feb 2023 08:28:50 +0100 (CET)

CVE-2023-23914: HSTS ignored on multiple requests
=================================================

Project curl Security Advisory, February 15 2023 -
[Permalink](https://curl.se/docs/CVE-2023-23914.html)

VULNERABILITY
-------------

curl's HSTS functionality fail when multiple URLs are requested serially.

Using its HSTS support, curl can be instructed to use HTTPS instead of using
an insecure clear-text HTTP step even when HTTP is provided in the URL. This
HSTS mechanism would however suprisingly be ignored by subsequent transfers
when done on the same command line because the state would not be properly
carried on.

Reproducible like this:

     curl --hsts "" https://curl.se http://curl.se

The first URL returns HSTS information that the second URL fails to take
advantage of.

We are not aware of any exploit of this flaw.

INFO
----
This is a curl command line issue and does not affect libcurl.
This flaw was introduced in [commit
7385610d0c7](https://github.com/curl/curl/commit/7385610d0c7), which was
shipped enabled by default from [commit
d71ff2b9db566b3f](https://github.com/curl/curl/commit/d71ff2b9db566b3f) in
curl 7.77.0.
The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2023-23914 to this issue.
CWE-319: Cleartext Transmission of Sensitive Information
Severity: Low
AFFECTED VERSIONS
-----------------
- Affected versions: curl 7.77.0 to and including 7.87.0
- Not affected versions: curl < 7.77.0 and curl >= 7.88.0
curl is used by many applications, but not always advertised as such!
THE SOLUTION
------------
7.88.0 will share the HSTS state properly between transfers.
A [fix for CVE-2023-23914](https://github.com/curl/curl/pull/10138)
RECOMMENDATIONS
--------------
  A - Upgrade curl to version 7.88.0
  B - Apply the patch to your local version
  C - Specify all URLs with `HTTPS://` and not `HTTP://`
TIMELINE
--------
This issue was reported to the curl project on December 21, 2022. We contacted
distros_at_openwall on February 7, 2022.
curl 7.88.0 was released on February 15 2023, coordinated with the publication
of this advisory.
CREDITS
-------
- Reported-by: Harry Sintonen
- Patched-by: Daniel Stenberg
Thanks a lot!
-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-02-15