← Vulnerability feed

Vulnerability record · CVE-2023-38545 · published 18 October 2023

CVE-2023-38545: curl SOCKS5 proxy handshake heap buffer overflow

Haxx · Libcurl

curl contains a heap-based out-of-bounds write (CWE-787) in the SOCKS5 proxy handshake. When a host name longer than 255 bytes is passed for proxy-side resolution, a state variable can take the wrong value during a slow handshake, causing the oversized host name to be copied into a heap buffer instead of the resolved address. The flaw is remotely reachable and can corrupt heap memory.

9.8 CVSS 3.1 Critical EPSS 78% · top 0.4% CWE-787 · Out-of-bounds write
9.8CVSS 3.1 base score
78%EPSS exploitation probability, 30 days
NoNot in CISA KEV
13Affected product versions listed by NVD
34References
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

critical priorityCVSS 9.8 critical with network reachability, no privileges or user interaction, and very high EPSS, though no KEV listing or confirmed exploitation.

What it is

curl contains a heap-based out-of-bounds write (CWE-787) in the SOCKS5 proxy handshake. When a host name longer than 255 bytes is passed for proxy-side resolution, a state variable can take the wrong value during a slow handshake, causing the oversized host name to be copied into a heap buffer instead of the resolved address. The flaw is remotely reachable and can corrupt heap memory.

Impact

An attacker can trigger an out-of-bounds heap write, potentially leading to memory corruption, a crash, or code execution in the context of the process using libcurl. The CVSS vector rates confidentiality, integrity, and availability impact as high.

Attack surface

Reached over the network (AV:N) with no privileges (PR:N) and no user interaction (UI:N) per the CVSS vector. Exploitation requires curl to be configured to use a SOCKS5 proxy with remote name resolution and to process an attacker-influenced URL containing an overlong host name.

Exploitation

Not listed in CISA KEV and no ransomware associations are documented. EPSS is very high (0.78483, 99.563rd percentile), and references include patch and third-party advisories, indicating active attention but no confirmed in-the-wild exploitation in this record.

What to do

  • Upgrade curl/libcurl to a version containing the fix referenced in the curl.se advisory (patch first).
  • Update or patch downstream products that bundle libcurl, including Fedora, NetApp, Microsoft Windows, and Apple components listed in vendor advisories.
  • Avoid using SOCKS5 proxy remote name resolution where possible; prefer local name resolution to reduce exposure.
  • Limit or sanitize untrusted URLs passed to curl/libcurl, especially host names exceeding 255 bytes.
  • Monitor vendor advisories for updated packages and apply them as they become available.

Detection

  • Monitor for curl/libcurl crashes or heap corruption events in applications using SOCKS5 proxies.
  • Inspect network traffic for SOCKS5 handshakes carrying unusually long host names (over 255 bytes).
  • Audit application logs for URLs with overlong host names processed through curl with proxy resolution enabled.
  • Track process crashes or abnormal memory errors in services that embed libcurl.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

13 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://seclists.org/fulldisclosure/2024/Jan/34 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2024/Jan/37 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2024/Jan/38 Mailing ListThird Party Advisory
https://curl.se/docs/CVE-2023-38545.html PatchThird Party Advisory
https://forum.vmssoftware.com/viewtopic.php?f=8&t=8868
https://lists.fedoraproject.org/archives/list/[email protected]/message/OGMXNRNSJ4ETDK6FRNU3J7SAB Mailing ListThird Party Advisory
https://security.netapp.com/advisory/ntap-20231027-0009/ Third Party Advisory
https://security.netapp.com/advisory/ntap-20240201-0005/ Third Party Advisory
https://support.apple.com/kb/HT214036 Third Party Advisory
https://support.apple.com/kb/HT214057 Third Party Advisory
https://support.apple.com/kb/HT214058 Third Party Advisory
https://support.apple.com/kb/HT214063 Third Party Advisory
https://www.secpod.com/blog/high-severity-heap-buffer-overflow-vulnerability/ PatchThird Party Advisory
http://seclists.org/fulldisclosure/2024/Jan/34 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2024/Jan/37 Mailing ListThird Party Advisory
http://seclists.org/fulldisclosure/2024/Jan/38 Mailing ListThird Party Advisory
https://curl.se/docs/CVE-2023-38545.html PatchThird Party Advisory
https://forum.vmssoftware.com/viewtopic.php?f=8&t=8868
https://lists.fedoraproject.org/archives/list/[email protected]/message/OGMXNRNSJ4ETDK6FRNU3J7SAB Mailing ListThird Party Advisory
https://security.netapp.com/advisory/ntap-20231027-0009/ Third Party Advisory
https://security.netapp.com/advisory/ntap-20240201-0005/ Third Party Advisory
https://support.apple.com/kb/HT214036 Third Party Advisory
https://support.apple.com/kb/HT214057 Third Party Advisory
https://support.apple.com/kb/HT214058 Third Party Advisory
https://support.apple.com/kb/HT214063 Third Party Advisory
https://www.secpod.com/blog/high-severity-heap-buffer-overflow-vulnerability/ PatchThird Party Advisory
https://cert-portal.siemens.com/productcert/html/ssa-082556.html
https://cert-portal.siemens.com/productcert/html/ssa-093430.html
https://cert-portal.siemens.com/productcert/html/ssa-507364.html
https://cert-portal.siemens.com/productcert/html/ssa-832273.html
https://cert-portal.siemens.com/productcert/html/ssa-943925.html
https://github.com/UTsweetyfish/CVE-2023-38545
https://github.com/bcdannyboy/CVE-2023-38545
https://github.com/dbrugman/CVE-2023-38545-POC

Track CVE-2023-38545 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-33824Double free in Windows IKE Extension enables remote code executionA double free flaw (CWE-415) exists in the Windows IKE Extension, reachable over the network by an unauthenticated attacker. Successful exploitation …KEVEPSS 1.6%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed9.8CVE-2021-44026Roundcube Webmail SQL injection via search parametersRoundcube Webmail before 1.3.17 and 1.4.x before 1.4.12 is prone to SQL injection through the search or search_params input. The flaw is remotely rea…KEVEPSS 70%analysed9.8CVE-2021-42013Apache HTTP Server path traversal and RCE via incomplete fixThe fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside…KEVEPSS 100%analysed9.8CVE-2021-41773Apache HTTP Server 2.4.49 path traversal and RCEA path normalization flaw introduced in Apache HTTP Server 2.4.49 lets attackers map URLs to files outside directories configured by Alias-like direc…KEVEPSS 100%analysed9.8CVE-2021-1870Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions, affecting macOS Big Sur, Catalina, Mojave, iOS and iPadOS, plus WebKitGTK a…KEVEPSS 7.7%analysed9.8CVE-2021-1871Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions. It affects macOS Big Sur, Catalina, Mojave, iOS and iPadOS, and a remote at…KEVEPSS 7.0%analysed

Source: NIST National Vulnerability Database (record CVE-2023-38545), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.