Cloudanix VulnDB

CVE-2023-46219

Medium · 5.3

CVSS

5.3

EPSS

1.1%

Published

Dec 12, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in the curl tool could wipe out its own record of which websites should always be reached securely, leaving future connections more open to eavesdropping or tampering.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Tampering
Component
Application
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Improper input validation when writing HSTS cache data allows an excessively long filename to cause the entire contents of the HSTS storage file to be removed or truncated, leaving subsequent curl requests without HSTS state.

Why it matters to the business

Organizations relying on curl for secure transfers may lose protection against protocol downgrade attacks on affected hosts, increasing exposure to interception or manipulation of HTTPS traffic until the cache is rebuilt or the tool is updated.

How an attack unfolds

An attacker does not directly trigger the flaw; instead, a vulnerable curl client that has previously stored HSTS data under a path that later resolves to an excessively long filename will silently erase its own HSTS cache file during a save operation, causing future requests to that host to ignore HSTS directives.

How to fix it

Upgrade curl to the version containing commit 7161cb17c01dcff1dc5bf89a18437d9d729f1ecd or later; rebuild any static binaries or containers that embed the vulnerable curl library; verify the updated binary reports the corrected behavior when handling long HSTS filenames.

How to confirm the fix worked

Confirm the installed curl binary or library is built from a source tree at or after commit 7161cb17c01dcff1dc5bf89a18437d9d729f1ecd; test by forcing an HSTS entry whose filename exceeds 255 characters and verifying the cache file is not emptied; monitor package or container manifests for the corrected curl version.

Typical attack path

  1. Victim uses a curl-based client or script that persists HSTS data to a file whose derived name exceeds platform limits.
  2. curl attempts to write updated HSTS entries and, due to the length validation failure, truncates or empties the cache file.
  3. Subsequent curl invocations to the same host proceed without HSTS awareness, allowing any active network attacker to perform SSL stripping or redirect attacks.

How to detect it

Search application and system logs for curl processes that reference HSTS cache files immediately before or after unexpected cache truncation events; examine file-system timestamps and size changes on known HSTS cache paths for sudden zero-byte or truncated files coinciding with curl invocations.

What your security team should do

  • Immediately inventory all systems and containers using curl and schedule upgrades to the fixed commit.
  • Add curl version checks to build pipelines and dependency scanners to prevent reintroduction of the vulnerable code.
  • Review any custom curl wrappers or scripts that manipulate the HSTS cache file and ensure they tolerate or avoid long filenames.

The record

When saving HSTS data to an excessively long file name, curl could end up removing all contents, making subsequent requests using that file unaware of the HSTS status they should otherwise use.

Affected packages

Ecosystem Package Introduced Fixed
Alpine:v3.15 curl 0 8.5.0-r0
Alpine:v3.16 curl 0 8.5.0-r0
Alpine:v3.17 curl 0 8.5.0-r0
Alpine:v3.18 curl 0 8.5.0-r0
Alpine:v3.19 curl 0 8.5.0-r0
Alpine:v3.20 curl 0 8.5.0-r0
Alpine:v3.21 curl 0 8.5.0-r0
Alpine:v3.22 curl 0 8.5.0-r0
Chainguard curl 0 8.5.0-r0
Chainguard curl-dev 0 8.5.0-r0
Chainguard curl-doc 0 8.5.0-r0
Chainguard curl-oci-entrypoint 0 8.5.0-r0
Chainguard curl-static 0 8.5.0-r0
Chainguard libcurl-openssl4 0 8.5.0-r0
Chainguard libcurl4 0 8.5.0-r0
Debian:11 curl 0 No fix
Debian:12 curl 0 7.88.1-10+deb12u5
Debian:13 curl 0 8.5.0-1
Mageia:8 curl 0 7.74.0-1.15.mga8
Mageia:9 curl 0 7.88.1-3.3.mga9
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-curl 0 0:8.6.0-3.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-curl-debuginfo 0 0:8.6.0-3.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-httpd 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-httpd-debuginfo 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-httpd-devel 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-httpd-manual 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-httpd-selinux 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-httpd-tools 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-libcurl 0 0:8.6.0-3.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-libcurl-devel 0 0:8.6.0-3.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_ldap 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_proxy_cluster 0 0:1.3.20-3.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_proxy_cluster-debuginfo 0 0:1.3.20-3.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_proxy_html 0 1:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_session 0 0:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_ssl 0 1:2.4.57-9.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl 0 1:1.1.1k-17.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-debuginfo 0 1:1.1.1k-17.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-devel 0 1:1.1.1k-17.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-libs 0 1:1.1.1k-17.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-perl 0 1:1.1.1k-17.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-static 0 1:1.1.1k-17.el7jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-curl 0 0:8.6.0-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-curl-debuginfo 0 0:8.6.0-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd-debuginfo 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd-devel 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd-manual 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd-selinux 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd-tools 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-httpd-tools-debuginfo 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-libcurl 0 0:8.6.0-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-libcurl-debuginfo 0 0:8.6.0-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-libcurl-devel 0 0:8.6.0-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_ldap 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_ldap-debuginfo 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_proxy_cluster 0 0:1.3.20-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_proxy_cluster-debuginfo 0 0:1.3.20-3.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_proxy_html 0 1:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_proxy_html-debuginfo 0 1:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_session 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_session-debuginfo 0 0:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_ssl 0 1:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_ssl-debuginfo 0 1:2.4.57-9.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl 0 1:1.1.1k-17.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-debuginfo 0 1:1.1.1k-17.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-devel 0 1:1.1.1k-17.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-libs 0 1:1.1.1k-17.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-libs-debuginfo 0 1:1.1.1k-17.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-perl 0 1:1.1.1k-17.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-static 0 1:1.1.1k-17.el8jbcs
SUSE:Linux Enterprise Micro 5.3 curl 0 8.0.1-150400.5.36.1
SUSE:Linux Enterprise Micro 5.4 curl 0 8.0.1-150400.5.36.1
SUSE:Linux Enterprise Micro 5.5 curl 0 8.0.1-150400.5.36.1
SUSE:Linux Enterprise Module for Basesystem 15 SP4 curl 0 8.0.1-150400.5.36.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 curl 0 8.0.1-150400.5.36.1
SUSE:Linux Enterprise Server 12 SP5 curl 0 8.0.1-11.80.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 curl 0 8.0.1-11.80.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 curl 0 8.0.1-11.80.1
Ubuntu:20.04:LTS curl 0 7.68.0-1ubuntu2.20
Ubuntu:20.04:LTS curl 0 7.68.0-1ubuntu2.21
Ubuntu:22.04:LTS curl 0 7.81.0-1ubuntu1.14
Ubuntu:22.04:LTS curl 0 7.81.0-1ubuntu1.15
Ubuntu:23.10 curl 0 8.2.1-1ubuntu3.2
Ubuntu:24.04:LTS curl 0 8.5.0-2ubuntu1
Wolfi curl 0 8.5.0-r0
Wolfi curl-dev 0 8.5.0-r0
Wolfi curl-doc 0 8.5.0-r0
Wolfi curl-oci-entrypoint 0 8.5.0-r0
Wolfi curl-static 0 8.5.0-r0
Wolfi libcurl-openssl4 0 8.5.0-r0
Wolfi libcurl4 0 8.5.0-r0
openSUSE:Leap 15.4 curl 0 8.0.1-150400.5.36.1
openSUSE:Leap 15.5 curl 0 8.0.1-150400.5.36.1
openSUSE:Leap Micro 5.3 curl 0 8.0.1-150400.5.36.1
openSUSE:Leap Micro 5.4 curl 0 8.0.1-150400.5.36.1
openSUSE:Tumbleweed curl 0 8.5.0-1.1

Related vulnerabilities