Bug 1207991 (CVE-2023-23915) - VUL-0: CVE-2023-23915: curl: HSTS amnesia with --parallel
Summary: VUL-0: CVE-2023-23915: curl: HSTS amnesia with --parallel
Status: RESOLVED FIXED
Alias: CVE-2023-23915
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/356341/
Whiteboard: CVSSv3.1:SUSE:CVE-2023-23915:7.4:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-07 11:56 UTC by Carlos López
Modified: 2024-03-12 15:52 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos López 2023-02-07 11:56:55 UTC
CVE-2023-23915: HSTS amnesia with --parallel
============================================

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

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

curl's HSTS cache saving behaves wrongly when multiple URLs are requested in
parallel.

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 surprisingly fail when multiple transfers are done
in parallel as the HSTS cache file gets overwritten by the most recently
completed transfer.

A later HTTP-only transfer to the earlier host name would then *not* get
upgraded properly to HSTS.

Reproducible like this:

1. `curl --hsts hsts.txt --parallel https://curl.se https://example.com`
2. `curl --hsts hsts.txt http://curl.se`

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-23915 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, making each
subsequent save store a complete state.

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@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!
Comment 3 Carlos López 2023-02-07 12:12:50 UTC
As with bnc#1207990, this only affects SUSE:SLE-15-SP4:Update and openSUSE:Factory.
Comment 10 Carlos López 2023-02-15 08:32:05 UTC
Public:
https://www.openwall.com/lists/oss-security/2023/02/15/2
Comment 11 Swamp Workflow Management 2023-02-15 21:01:49 UTC
SUSE-SU-2023:0429-1: An update that fixes three vulnerabilities is now available.

Category: security (important)
Bug References: 1207990,1207991,1207992
CVE References: CVE-2023-23914,CVE-2023-23915,CVE-2023-23916
JIRA References: 
Sources used:
openSUSE Leap Micro 5.3 (src):    curl-7.79.1-150400.5.15.1
openSUSE Leap 15.4 (src):    curl-7.79.1-150400.5.15.1
SUSE Linux Enterprise Module for Basesystem 15-SP4 (src):    curl-7.79.1-150400.5.15.1
SUSE Linux Enterprise Micro 5.3 (src):    curl-7.79.1-150400.5.15.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Pedro Monreal Gonzalez 2023-02-15 21:30:49 UTC
Factory submission: https://build.opensuse.org/request/show/1066057

Assigning back to security-team.
Comment 14 Carlos López 2023-04-13 15:12:01 UTC
Done, closing.