# 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.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Nov 2024
- **Updated:** 3 Nov 2025
- **Also known as:** ALPINE-CVE-2024-9681, AZL-52335, AZL-52347, AZL-52402, AZL-52405, AZL-52414, AZL-52426, AZL-52444, AZL-52449, BELL-CVE-2024-9681, CLEANSTART-2026-SH97869, CLSA-2025-1764773365, CLSA-2026-1767628458, CURL-CVE-2024-9681, DEBIAN-CVE-2024-9681, ECHO-0664-e7e6-550e, GHSA-g337-g667-mjvw, JLSEC-2026-419, MGASA-2024-0360, MINI-vgh4-22cx-ffr7, OESA-2024-2388, OESA-2024-2389, OESA-2024-2472, OESA-2024-2473, ROOT-OS-DEBIAN-11-CVE-2024-9681, SUSE-SU-2024:3925-1, SUSE-SU-2024:3926-1, SUSE-SU-2024:3927-1, SUSE-SU-2024:3927-2, SUSE-SU-2025:20083-1, UBUNTU-CVE-2024-9681, USN-7104-1, openSUSE-SU-2024:14476-1

## 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 (Incorrect Comparison)

## Which versions are affected by CVE-2024-9681?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `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: 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

- [CVE-2026-19931](https://insights.sbomify.com/CVE-2026-19931/): Negotiate ambient user conn reuse (critical 9.8)
- [CVE-2026-10536](https://insights.sbomify.com/CVE-2026-10536/): HTTP/2 stream-dependency tree UAF (critical 9.8)
- [CVE-2026-11856](https://insights.sbomify.com/CVE-2026-11856/): cross-origin Digest auth state leak (critical 9.8)
- [CVE-2026-8925](https://insights.sbomify.com/CVE-2026-8925/): SASL double-free (critical 9.8)
- [CVE-2026-9079](https://insights.sbomify.com/CVE-2026-9079/): stale proxy password leak (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-9681 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2024-9681 in the wild and no public exploit code.

Affected product: Haxx Curl. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-9681/ (Markdown: https://insights.sbomify.com/CVE-2024-9681/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-9681
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-9681
- OSV: https://osv.dev/vulnerability/CVE-2024-9681

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-9681/
Summaries are generated and may contain mistakes; the official description above is the record.
