# CVE-2023-46219: curl HSTS data loss via excessively long filenames

Source: https://junglewise.ai/threats/cve-2023-46219-curl-hsts-data-loss-via-excessively-long-filenames  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-12-12. Updated: 2026-05-12  
License: CC BY 4.0 with a link back

CVE-2023-46219 · Severity: medium · CVSS 5.3 · Published 2023-12-12

A vulnerability in the curl data transfer tool can cause it to accidentally delete its security configuration file when using an excessively long filename. This file stores HSTS data, which ensures that connections to specific websites always use secure encryption. If this data is lost, subsequent connections may revert to insecure communication, potentially exposing sensitive information to interception.

Technologies: [Fedoraproject Fedora](https://junglewise.ai/threats/technologies/fedora), [Haxx Curl](https://junglewise.ai/threats/technologies/curl). Vendors: [Fedoraproject](https://junglewise.ai/threats/vendors/fedoraproject), [Haxx](https://junglewise.ai/threats/vendors/haxx).

## Quick answers

**Is CVE-2023-46219 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2023-46219 being exploited in the wild.

**How severe is CVE-2023-46219?** Medium severity, with a CVSS score of 5.3, published 12 December 2023.

**Which products and versions are affected?** Fedora Project Fedora Linux 8.0.1-6.fc38.

**Is there a fix for CVE-2023-46219?** A patch was published on 2023-12-06: Fixed in curl version 8.5.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-46219 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2023-46219?** Check whether you run Fedora Project Fedora Linux, Fedoraproject Fedora or Haxx Curl at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A logic error exists in curl's HSTS (HTTP Strict Transport Security) data saving function. The function attempts to create a temporary file by appending a suffix to the user-provided filename before renaming it to the final destination. If the original filename is near the filesystem's maximum length limit, adding the suffix causes the filename to exceed the limit, resulting in a failure that can clear the existing HSTS file contents. This leads to a loss of HSTS state, potentially allowing subsequent network requests to downgrade from HTTPS to HTTP. The issue is fixed in curl 8.5.0 by using a random sequence for temporary filenames instead of deriving them from the original filename.

## Affected products

- haxx curl 7.84.0 to 8.4.0
- fedoraproject Fedora 38 8.0.1-6.fc38
- fedoraproject Fedora 39 8.2.1-4.fc39
- Debian Debian GNU/Linux 11 (bullseye) 7.74.0-1.3+deb11u11
- Debian Debian GNU/Linux 12 (bookworm) 7.88.1-10+deb12u5

## Timeline

- 2023-11-02: disclosed: Reported to the curl project
- 2023-12-06: patched: Fixed in curl version 8.5.0
- 2023-12-06: advisory: Project curl security advisory published
- 2023-12-12: advisory: NVD published CVE-2023-46219

## References

- [https://curl.se/docs/CVE-2023-46219.html](https://curl.se/docs/CVE-2023-46219.html)
- [https://hackerone.com/reports/2236133](https://hackerone.com/reports/2236133)
- [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UOGXU25FMMT2X6UUITQ7EZZYMJ42YWWD/](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UOGXU25FMMT2X6UUITQ7EZZYMJ42YWWD/)
- [https://security.netapp.com/advisory/ntap-20240119-0007/](https://security.netapp.com/advisory/ntap-20240119-0007/)
- [https://www.debian.org/security/2023/dsa-5587](https://www.debian.org/security/2023/dsa-5587)
- [https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3ZX3VW67N4ACRAPMV2QS2LVYGD7H2MVE/](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3ZX3VW67N4ACRAPMV2QS2LVYGD7H2MVE/)
- [https://cert-portal.siemens.com/productcert/html/ssa-082556.html](https://cert-portal.siemens.com/productcert/html/ssa-082556.html)

## Related threats

- [curl Public Suffix List domain boundary check bypass in cookie handling](https://junglewise.ai/threats/cve-2026-82209-curl-public-suffix-list-domain-boundary-check-bypass-in-cookie)
- [curl libcurl certificate validation bypass in wolfSSL backend](https://junglewise.ai/threats/cve-2026-82208-curl-libcurl-certificate-validation-bypass-in-wolfssl-backend)
- [curl secure cookie attribute bypass with tab](https://junglewise.ai/threats/cve-2026-80255-curl-secure-cookie-attribute-bypass-with-tab)
- [curl HTTPS connection reuse with mismatched CA store settings](https://junglewise.ai/threats/cve-2026-80231-curl-https-connection-reuse-with-mismatched-ca-store-settings)
- [curl public key pinning bypass with disabled peer verification](https://junglewise.ai/threats/cve-2026-80230-curl-public-key-pinning-bypass-with-disabled-peer-verification)
