CVE-2024-9681 HSTS subdomain overwrites parent cache entry
Attackers can manipulate HSTS cache entries via subdomain headers, causing curl to incorrectly enforce or drop HTTPS, leading to potential downgrade attacks or service unavailability.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-9681?
CVE-2024-9681 is a medium-severity vulnerability in Haxx Curl, published on 6 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
When curl is asked to use HSTS, the expiry time for a subdomain might overwrite a parent domain's cache entry, making it end sooner or later than otherwise intended.
This affects curl using applications that enable HSTS and use URLs with the insecure `HTTP://` scheme and perform transfers with hosts like `x.example.com` as well as `example.com` where the first host is a subdomain of the second host.
(The HSTS cache either needs to have been populated manually or there needs to have been previous HTTPS accesses done as the cache needs to have entries for the domains involved to trigger this problem.)
When `x.example.com` responds with `Strict-Transport-Security:` headers, this bug can make the subdomain's expiry timeout *bleed over* and get set for the parent domain `example.com` in curl's HSTS cache.
The result of a triggered bug is that HTTP accesses to `example.com` get converted to HTTPS for a different period of time than what was asked for by the origin server. If `example.com` for example stops supporting HTTPS at its expiry time, curl might then fail to access `http://example.com` until the (wrongly set) timeout expires. This bug can also expire the parent's entry *earlier*, thus making curl inadvertently switch back to insecure HTTP earlier than otherwise intended.
Weakness: CWE-697
Which versions are affected by CVE-2024-9681?
It affects 1 product.
Linux distribution packages (22)
curl SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Installer Updates 15 SP4 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Installer Updates 15 SP5 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Micro 5.3 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Micro 5.4 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Micro 5.5 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 8.6.0-150600.4.12.1 |
curl SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 8.0.1-11.98.1 |
curl SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 8.0.1-11.98.1 |
curl SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 8.0.1-11.98.1 |
curl SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 8.0.1-11.98.1 |
curl SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Linux Micro 6.0 | All versions | 8.6.0-4.1 |
curl SUSE:Manager Proxy 4.3 | All versions | 8.0.1-150400.5.56.1 |
curl SUSE:Manager Server 4.3 | All versions | 8.0.1-150400.5.56.1 |
curl openSUSE:Leap 15.5 | All versions | 8.0.1-150400.5.56.1 |
curl openSUSE:Leap 15.6 | All versions | 8.6.0-150600.4.12.1 |
curl openSUSE:Leap Micro 5.5 | All versions | 8.0.1-150400.5.56.1 |
curl openSUSE:Tumbleweed | All versions | 8.11.0-1.1 |
Products include Haxx Curl.
How do I fix CVE-2024-9681?
Apply the vendor's patch.
Is CVE-2024-9681 being exploited?
There is no known exploitation of CVE-2024-9681 in the wild and no public exploit code.
Other vulnerabilities in Haxx Curl
Sources
Also known as ALPINE-CVE-2024-9681, AZL-52335, AZL-52347, AZL-52402, AZL-52405, AZL-52414 and 27 more.