CVE-2023-23914: curl HSTS ignored on multiple requests
curl's HSTS implementation fails to enforce HTTPS for subsequent requests within the same invocation when multiple URLs are provided. An attacker could exploit this to cause a request to be sent over HTTP, leading to loss of confidentiality and integrity.
- Triaged in 5 hours
- Fixed in 56 days
- Disclosed after 56 days
Summary:
curl tool HSTS doesn't work correctly when performing multiple requests within a single invocation.
Steps To Reproduce:
curl --hsts "" https://hsts.example.com http://hsts.example.com
The second request will be performed over HTTP regardless if correct HSTS header is returned by the first request.
Impact
Request performed over insecure channels unexpectedly and loss of confidentiality and integrity.
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, curl's HSTS cache is not properly applied across multiple requests in a single invocation, so the HSTS policy from the first response is not enforced for subsequent requests.
Impact
A request could be sent over an insecure channel unexpectedly, leading to loss of confidentiality and integrity.
What the attacker needed
Curl version affected by CVE-2023-23914; multiple URLs in one invocation
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.
HSTS is a security feature that tells browsers and tools to always use HTTPS for a website. In this bug, curl ignored that rule when given more than one URL, so the second request went over plain HTTP, which is not encrypted and can be read or changed by attackers.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.