Cloudanix VulnDB

CVE-2023-38546

Low · 3.7

CVSS

3.7

EPSS

6.0%

Published

Oct 18, 2023

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A programming library used for internet transfers could let attackers slip in fake cookies under rare conditions, potentially interfering with how programs manage web connections.

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

What it actually does

The flaw causes libcurl to store the literal string 'none' as a cookie jar filename when duplicating an easy handle that had cookies enabled but no explicit cookie file set, leading to subsequent transfers inadvertently reading cookies from a file named 'none' in the current working directory if it exists and matches the expected format.

Why it matters to the business

Applications relying on affected libcurl versions risk unauthorized cookie injection during HTTP transfers, which can undermine session integrity or expose sensitive data in networked operations across many dependent systems.

How an attack unfolds

An attacker places a crafted cookie file named 'none' in the working directory of a target process using libcurl. The victim application then creates an easy handle, enables cookies, duplicates it via curl_easy_duphandle, and performs a transfer without resetting the cookie source, causing libcurl to load the attacker's cookies.

How to fix it

Upgrade libcurl to a build containing commit 172e54cda18412da73fd8eb4e444e8a5b371ca59 or newer; rebuild and redeploy all dependent applications after the update.

How to confirm the fix worked

Confirm the installed libcurl source or binary incorporates commit 172e54cda18412da73fd8eb4e444e8a5b371ca59; test by duplicating cookie-enabled handles and verifying no accidental load from a 'none' file occurs.

Typical attack path

  1. Place a malicious cookie jar file named 'none' in the current working directory of the target process
  2. Trigger the application to initialize a libcurl easy handle and enable cookie handling without specifying a source file
  3. Invoke curl_easy_duphandle on the handle to clone the cookie state as 'none'
  4. Perform a subsequent transfer to force loading of cookies from the attacker-controlled 'none' file

How to detect it

Inspect process working directories for files literally named 'none' containing cookie data; review application and system logs for unexpected cookie jar accesses or transfers involving unusual cookie values.

What your security team should do

  • Prioritize updating all libcurl instances to the fixed commit across the environment
  • Review and harden cookie handling code paths in applications using libcurl
  • Scan for and remove any unexpected 'none' files in directories used as working directories by curl-based processes

The record

This flaw allows an attacker to insert cookies at will into a running program using libcurl, if the specific series of conditions are met. libcurl performs transfers. In its API, an application creates "easy handles" that are the individual handles for single transfers. libcurl provides a function call that duplicates en easy handle called [curl_easy_duphandle](https://curl.se/libcurl/c/curl_easy_duphandle.html). If a transfer has cookies enabled when the handle is duplicated, the cookie-enable state is also cloned - but without cloning the actual cookies. If the source handle did not read any cookies from a specific file on disk, the cloned version of the handle would instead store the file name as `none` (using the four ASCII letters, no quotes). Subsequent use of the cloned handle that does not explicitly set a source to load cookies from would then inadvertently load cookies from a file named `none` - if such a file exists and is readable in the current directory of the program using libcurl. And if using the correct file format of course.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 curl 0 7.61.1-33.el8_9.5
AlmaLinux:8 libcurl 0 7.61.1-33.el8_9.5
AlmaLinux:8 libcurl-devel 0 7.61.1-33.el8_9.5
AlmaLinux:8 libcurl-minimal 0 7.61.1-33.el8_9.5
AlmaLinux:9 curl 0 7.76.1-23.el9_2.4
AlmaLinux:9 curl 0 7.76.1-26.el9_3.2
AlmaLinux:9 curl-minimal 0 7.76.1-23.el9_2.4
AlmaLinux:9 curl-minimal 0 7.76.1-26.el9_3.2
AlmaLinux:9 libcurl 0 7.76.1-23.el9_2.4
AlmaLinux:9 libcurl 0 7.76.1-26.el9_3.2
AlmaLinux:9 libcurl-devel 0 7.76.1-23.el9_2.4
AlmaLinux:9 libcurl-devel 0 7.76.1-26.el9_3.2
AlmaLinux:9 libcurl-minimal 0 7.76.1-23.el9_2.4
AlmaLinux:9 libcurl-minimal 0 7.76.1-26.el9_3.2
Alpine:v3.15 curl 0 8.4.0-r0
Alpine:v3.16 curl 0 8.4.0-r0
Alpine:v3.17 curl 0 8.4.0-r0
Alpine:v3.18 curl 0 8.4.0-r0
Alpine:v3.19 curl 0 8.4.0-r0
Alpine:v3.20 curl 0 8.4.0-r0
Alpine:v3.21 curl 0 8.4.0-r0
Alpine:v3.22 curl 0 8.4.0-r0
Chainguard curl 0 8.4.0-r0
Chainguard curl-dev 0 8.4.0-r0
Chainguard curl-doc 0 8.4.0-r0
Chainguard curl-oci-entrypoint 0 8.4.0-r0
Chainguard curl-rustls 0 8.4.0-r0
Chainguard curl-static 0 8.4.0-r0
Chainguard libcurl-openssl4 0 8.4.0-r0
Chainguard libcurl-rustls4 0 8.4.0-r0
Chainguard libcurl4 0 8.4.0-r0
Debian:10 curl 0 7.64.0-4+deb10u7
Debian:11 curl 0 7.74.0-1.3+deb11u10
Debian:12 curl 0 7.88.1-10+deb12u4
Debian:13 curl 0 8.3.0-3
Mageia:8 curl 0 7.74.0-1.14.mga8
Mageia:9 curl 0 7.88.1-3.2.mga9
Red Hat:enterprise_linux:8::baseos curl 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos curl-debuginfo 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos curl-debugsource 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos curl-minimal-debuginfo 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos libcurl 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos libcurl-debuginfo 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos libcurl-devel 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos libcurl-minimal 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:8::baseos libcurl-minimal-debuginfo 0 0:7.61.1-33.el8_9.5
Red Hat:enterprise_linux:9::appstream curl 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream curl 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream curl-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream curl-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream curl-debugsource 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream curl-debugsource 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream curl-minimal 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream curl-minimal 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream curl-minimal-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream curl-minimal-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream libcurl 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream libcurl 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream libcurl-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream libcurl-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream libcurl-devel 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream libcurl-devel 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream libcurl-minimal 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream libcurl-minimal 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::appstream libcurl-minimal-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::appstream libcurl-minimal-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos curl 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos curl 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos curl-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos curl-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos curl-debugsource 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos curl-debugsource 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos curl-minimal 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos curl-minimal 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos curl-minimal-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos curl-minimal-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos libcurl 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos libcurl 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos libcurl-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos libcurl-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos libcurl-devel 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos libcurl-devel 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos libcurl-minimal 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos libcurl-minimal 0 0:7.76.1-26.el9_3.2
Red Hat:enterprise_linux:9::baseos libcurl-minimal-debuginfo 0 0:7.76.1-23.el9_2.4
Red Hat:enterprise_linux:9::baseos libcurl-minimal-debuginfo 0 0:7.76.1-26.el9_3.2
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-curl 0 0:8.4.0-2.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-curl-debuginfo 0 0:8.4.0-2.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-libcurl 0 0:8.4.0-2.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-libcurl-devel 0 0:8.4.0-2.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_http2 0 0:1.15.19-32.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_http2-debuginfo 0 0:1.15.19-32.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_jk 0 0:1.2.49-1.redhat_1.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_jk-ap24 0 0:1.2.49-1.redhat_1.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-mod_jk-debuginfo 0 0:1.2.49-1.redhat_1.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl 0 1:1.1.1k-16.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-debuginfo 0 1:1.1.1k-16.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-devel 0 1:1.1.1k-16.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-libs 0 1:1.1.1k-16.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-perl 0 1:1.1.1k-16.el7jbcs
Red Hat:jboss_core_services:1::el7 jbcs-httpd24-openssl-static 0 1:1.1.1k-16.el7jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-curl 0 0:8.4.0-2.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-curl-debuginfo 0 0:8.4.0-2.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-libcurl 0 0:8.4.0-2.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-libcurl-debuginfo 0 0:8.4.0-2.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-libcurl-devel 0 0:8.4.0-2.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_http2 0 0:1.15.19-32.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_http2-debuginfo 0 0:1.15.19-32.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_jk 0 0:1.2.49-1.redhat_1.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_jk-ap24 0 0:1.2.49-1.redhat_1.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-mod_jk-ap24-debuginfo 0 0:1.2.49-1.redhat_1.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl 0 1:1.1.1k-16.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-debuginfo 0 1:1.1.1k-16.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-devel 0 1:1.1.1k-16.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-libs 0 1:1.1.1k-16.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-libs-debuginfo 0 1:1.1.1k-16.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-perl 0 1:1.1.1k-16.el8jbcs
Red Hat:jboss_core_services:1::el8 jbcs-httpd24-openssl-static 0 1:1.1.1k-16.el8jbcs
Red Hat:rhel_eus:8.6::baseos curl 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos curl-debuginfo 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos curl-debugsource 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos curl-minimal-debuginfo 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos libcurl 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos libcurl-debuginfo 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos libcurl-devel 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos libcurl-minimal 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.6::baseos libcurl-minimal-debuginfo 0 0:7.61.1-22.el8_6.9
Red Hat:rhel_eus:8.8::baseos curl 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos curl-debuginfo 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos curl-debugsource 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos curl-minimal-debuginfo 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos libcurl 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos libcurl-debuginfo 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos libcurl-devel 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos libcurl-minimal 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:8.8::baseos libcurl-minimal-debuginfo 0 0:7.61.1-30.el8_8.6
Red Hat:rhel_eus:9.0::appstream curl 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream curl-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream curl-debugsource 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream curl-minimal 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream curl-minimal-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream libcurl 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream libcurl-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream libcurl-devel 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream libcurl-minimal 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::appstream libcurl-minimal-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos curl 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos curl-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos curl-debugsource 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos curl-minimal 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos curl-minimal-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos libcurl 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos libcurl-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos libcurl-devel 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos libcurl-minimal 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_eus:9.0::baseos libcurl-minimal-debuginfo 0 0:7.76.1-14.el9_0.9
Red Hat:rhel_satellite_client:6::el6 puppet-agent 0 0:7.28.0-1.el6sat
Red Hat:rhel_satellite_client:6::el7 puppet-agent 0 0:7.28.0-1.el7sat
Red Hat:rhel_satellite_client:6::el8 puppet-agent 0 0:7.28.0-1.el8sat
Red Hat:rhel_satellite_client:6::el9 puppet-agent 0 0:7.28.0-1.el9sat
Rocky Linux:8 curl 0 0:7.61.1-33.el8_9.5
Rocky Linux:9 curl 0 0:7.76.1-23.el9_2.4
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS curl 0 7.60.0-150000.56.1
SUSE:Linux Enterprise Micro 5.1 curl 0 7.66.0-150200.4.60.1
SUSE:Linux Enterprise Micro 5.2 curl 0 7.66.0-150200.4.60.1
SUSE:Linux Enterprise Micro 5.3 curl 0 8.0.1-150400.5.32.1
SUSE:Linux Enterprise Micro 5.4 curl 0 8.0.1-150400.5.32.1
SUSE:Linux Enterprise Micro 5.5 curl 0 8.0.1-150400.5.32.1
SUSE:Linux Enterprise Module for Basesystem 15 SP4 curl 0 8.0.1-150400.5.32.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 curl 0 8.0.1-150400.5.32.1
SUSE:Linux Enterprise Server 12 SP5 curl 0 8.0.1-11.74.1
SUSE:Linux Enterprise Server 15 SP1-LTSS curl 0 7.60.0-150000.56.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 curl 0 8.0.1-11.74.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 curl 0 7.60.0-150000.56.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 curl 0 8.0.1-11.74.1
SUSE:Manager Proxy 4.2 curl 0 7.66.0-150200.4.60.1
SUSE:Manager Server 4.2 curl 0 7.66.0-150200.4.60.1
Ubuntu:20.04:LTS curl 0 7.68.0-1ubuntu2.20
Ubuntu:22.04:LTS curl 0 7.81.0-1ubuntu1.14
Ubuntu:23.10 curl 0 8.2.1-1ubuntu3.1
Ubuntu:24.04:LTS curl 0 8.2.1-1ubuntu3.1
Ubuntu:Pro:14.04:LTS curl 0 7.35.0-1ubuntu2.20+esm17
Ubuntu:Pro:16.04:LTS curl 0 7.47.0-1ubuntu2.19+esm10
Ubuntu:Pro:18.04:LTS curl 0 7.58.0-2ubuntu3.24+esm2
Wolfi curl 0 8.4.0-r0
Wolfi curl-dev 0 8.4.0-r0
Wolfi curl-doc 0 8.4.0-r0
Wolfi curl-oci-entrypoint 0 8.4.0-r0
Wolfi curl-rustls 0 8.4.0-r0
Wolfi curl-static 0 8.4.0-r0
Wolfi libcurl-openssl4 0 8.4.0-r0
Wolfi libcurl-rustls4 0 8.4.0-r0
Wolfi libcurl4 0 8.4.0-r0
conan libcurl 7.9.1 8.4.0
openSUSE:Leap 15.4 curl 0 8.0.1-150400.5.32.1
openSUSE:Leap 15.5 curl 0 8.0.1-150400.5.32.1
openSUSE:Tumbleweed curl 0 8.4.0-1.1

Related vulnerabilities