CVEfocus › CVE database › CVE-2024-9681

CVE-2024-9681HSTS subdomain overwrites parent cache entry

CVSS 5.9 MediumEPSS 2.6% (higher than 86% of CVEs)Published 2024-11-06Updated 2025-11-03Assigner: curl

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.

What to do

Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.

Red Hat has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

12Fixed
5Fix pending
7Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04curlFixed8.5.0-2ubuntu10.5UBUNTU-CVE-2024-9681
Ubuntu 22.04curlFixed7.81.0-1ubuntu1.19UBUNTU-CVE-2024-9681
Debian 14curlFixed8.11.0-1DEBIAN-CVE-2024-9681
Debian 13curlFixed8.11.0-1DEBIAN-CVE-2024-9681
Debian 12curlFixed7.88.1-10+deb12u9DEBIAN-CVE-2024-9681
Red Hat Enterprise Linux 9curlFix pending
Fix deferred
Red Hat Enterprise Linux 9curl-minimalFix pending
Fix deferred
Red Hat Enterprise Linux 9libcurlFix pending
Fix deferred
Red Hat Enterprise Linux 9libcurl-develFix pending
Fix deferred
Red Hat Enterprise Linux 9libcurl-minimalFix pending
Fix deferred
Red Hat Enterprise Linux 8curlNot affected
Red Hat Enterprise Linux 8libcurlNot affected
Red Hat Enterprise Linux 8libcurl-develNot affected
Red Hat Enterprise Linux 8libcurl-minimalNot affected
Red Hat Enterprise Linux 7curlNot affected
Red Hat Enterprise Linux 7libcurlNot affected
Red Hat Enterprise Linux 7libcurl-develNot affected
Alpine Linux 3.24curlFixed8.11.0-r0ALPINE-CVE-2024-9681
Alpine Linux 3.23curlFixed8.11.0-r0ALPINE-CVE-2024-9681
Alpine Linux 3.22curlFixed8.11.0-r0ALPINE-CVE-2024-9681
Alpine Linux 3.21curlFixed8.11.0-r0ALPINE-CVE-2024-9681
Alpine Linux 3.20curlFixed8.11.0-r0ALPINE-CVE-2024-9681
Alpine Linux 3.19curlFixed8.11.0-r0ALPINE-CVE-2024-9681
Alpine Linux 3.18curlFixed8.11.0-r0ALPINE-CVE-2024-9681

What the vendor says

As published in the CVE record by curl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.