Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2023-38545 EUVD-2023-42344GHSA-7xw9-w465-6x42

This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. When curl is asked to pass along the host name to the SOCK…

Published Oct 18, 2023 · Updated Oct 14, 2026 · Assigned by hackerone

Description

This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy
handshake.

When curl is asked to pass along the host name to the SOCKS5 proxy to allow
that to resolve the address instead of it getting done by curl itself, the
maximum length that host name can be is 255 bytes.

If the host name is detected to be longer, curl switches to local name
resolving and instead passes on the resolved address only. Due to this bug,
the local variable that means "let the host resolve the name" could get the
wrong value during a slow SOCKS5 handshake, and contrary to the intention,
copy the too long host name to the target buffer instead of copying just the
resolved address there.

The target buffer being a heap based buffer, and the host name coming from the
URL that curl has been told to operate with.

Affected products

VendorProductAffectedFixed
curl curl 8.4.0 – < 8.4.0 8.4.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 curl 8.3.0-3 —
Debian 13 curl 8.3.0-3 —
Debian 12 curl 7.88.1-10+deb12u4 DSA-5523-1
Debian 11 curl 7.74.0-1.3+deb11u10 DSA-5523-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS curl 8.2.1-1ubuntu3.1 —
Ubuntu 22.04 LTS curl 7.81.0-1ubuntu1.14 USN-6429-1
Ubuntu 20.04 LTS curl 7.68.0-1ubuntu2.20 USN-6429-1
ReleasePackageFixed inAdvisory
RHEL 9 curl +4 7.76.1-23.el9_2.4 RHSA-2023:6745, RHSA-2023:5763
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Satellite Capsule 6 mosquitto 2.0.17-1.el8sat RHSA-2024:0797
Red Hat Satellite Capsule 6 puppet-agent 7.27.0-1.el8sat RHSA-2024:0797
Red Hat Satellite Capsule 6 puppetserver 7.14.0-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 candlepin +1 4.3.11-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 mosquitto 2.0.17-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 puppet-agent 7.27.0-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 puppetserver 7.14.0-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 rubygem-grpc 1.58.0-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 rubygem-puma 6.3.1-1.el8sat RHSA-2024:0797
Red Hat Satellite 6 rubygem-sidekiq 6.5.12-1.el8sat RHSA-2024:0797
Red Hat Rhel Satellite Client 6 puppet-agent 7.27.0-1.el6sat RHSA-2024:2011
RHEL 9.0 EUS curl +4 7.76.1-14.el9_0.9 RHSA-2023:5700
Red Hat JBoss Core Services 1 jbcs-httpd24-curl +2 8.4.0-2.el7jbcs RHSA-2023:7625
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_http2 1.15.19-32.el7jbcs RHSA-2023:7625
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_jk +1 1.2.49-1.redhat_1.el7jbcs RHSA-2023:7625
Red Hat JBoss Core Services 1 jbcs-httpd24-openssl +4 1:1.1.1k-16.el7jbcs RHSA-2023:7625

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 curl +4 7.76.1-23.el9_2.4 ALSA-2023:6745, ALSA-2023:5763

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 curl 7.76.1-23.el9_2.4 RLSA-2023:5763
ReleasePackageFixed inAdvisory
SLES 15 SP5 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
SLES 15 SP4 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
SLES 12 SP5 curl 8.0.1-11.74.1 SUSE-SU-2023:4043-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 12 SP5 curl 8.0.1-11.74.1 SUSE-SU-2023:4043-1
SLE Micro 5.5 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
SLE Micro 5.4 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
SLE Micro 5.3 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed cmake 3.27.8-1.1 openSUSE-SU-2024:13464-1
openSUSE Tumbleweed curl 8.4.0-1.1 openSUSE-SU-2024:13325-1
openSUSE Leap 15.5 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
openSUSE Leap 15.4 curl 8.0.1-150400.5.32.1 SUSE-SU-2023:4044-1
ReleasePackageFixed inAdvisory
Alpine v3.24 curl 8.4.0-r0 —
Alpine v3.23 curl 8.4.0-r0 —
Alpine v3.22 curl 8.4.0-r0 —
Alpine v3.21 curl 8.4.0-r0 —
Alpine v3.20 curl 8.4.0-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 curl 8.4.0-r0 —
Alpine v3.18 curl 8.4.0-r0 —
Alpine v3.17 curl 8.4.0-r0 —
Alpine v3.16 curl 8.4.0-r0 —
Alpine v3.15 curl 8.4.0-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 curl +4 8.3.0-1.amzn2023.0.2 ALAS2023-2023-377
Amazon Linux 2 curl +2 8.3.0-1.amzn2.0.4 ALAS2-2023-2287

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 cmake 3.21.4-10 —
Azure Linux 3 tensorflow 2.16.1-1 —
Azure Linux 2 (CBL-Mariner) cmake 3.21.4-10 —
Azure Linux 2 (CBL-Mariner) curl 8.3.0-2 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 curl +4 7.76.1-23.el9_2.4 ELSA-2023-6745, ELSA-2023-5763

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling curl +1 8.4.0-r0 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 8 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 48

References