Skip to main content
Public proof of conceptFix available

CVE-2023-38545

curl: heap based buffer overflow in the SOCKS5 proxy handshake

A public proof of concept exists; no exploitation attested.

  • Published2023-10-18
  • WeaknessCWE-787

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2023-10-1804:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-10-23 15:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2023-38545?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2023-38545?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD
Fedoraproject fedora
BranchAffectedFixed in
37.x= 37no fix published
Haxx libcurl
BranchAffectedFixed in
8.4≥ 7.69.0, < 8.4.08.4.0
Microsoft windows 10 1809
BranchAffectedFixed in
10.0< 10.0.17763.512210.0.17763.5122

10 more products in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • curlUbuntu:23.10all versions · fixed in 8.2.1-1ubuntu3.1
  • libcurlAlmaLinux:9all versions · fixed in 7.76.1-26.el9_3.2and 4 other packages

Vendor advisories

  • CVE-2023-38545 Red Hat Product Security245 products fixed

    curl: heap based buffer overflow in the SOCKS5 proxy handshake

  • ICSA-26-043-04 CISA6 known affected

    Siemens Desigo CC Product Family and SENTRON Powermanager

    Desigo CC family V6 · Desigo CC family V7 · Desigo CC family V8 · +3 more

  • SSA-507364 Siemens ProductCERT6 known affected

    SSA-507364: Heap Based Buffer Overflow Vulnerability in WIBU CodeMeter Runtime Affecting the Desigo CC Product Family and SENTRON Powermanager

    Desigo CC family V6 · Desigo CC family V7 · Desigo CC family V8 · +3 more

  • ICSA-25-162-05 CISA5 known affected

    Siemens SIMATIC S7-1500 CPU family

    SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) · +2 more

  • SSA-082556 Siemens ProductCERT5 known affected

    SSA-082556: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP V3.1.5

    SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.5 · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.5 · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.5 · +2 more

  • ICSA-24-137-07 CISA7 known affected

    Siemens SIMATIC RTLS Locating Manager

    SIMATIC RTLS Locating Manager (6GT2780-0DA00) · SIMATIC RTLS Locating Manager (6GT2780-0DA10) · SIMATIC RTLS Locating Manager (6GT2780-0DA20) · +4 more

13 more advisories

Full record on NVD

Fix

  1. Vendor fix Siemens ProductCERT SSA-507364 · 1 productUpdate to V8.0 QU2 or later version
  2. Vendor fix Siemens ProductCERT SSA-507364 · 4 productsApply patch as documented in section 'Additional Information'
  3. Vendor fix CISA ICSA-26-043-04 · 1 productUpdate to V8.0 QU2 or later version
  4. Vendor fix CISA ICSA-26-043-04 · 4 productsApply patch as documented in section 'Additional Information'
  5. Vendor fix CISA ICSA-24-137-07 · 7 productsUpdate to V3.0.1.1 or later version The update is available from Siemens Online Software Delivery (OSD).
  6. Vendor fix Siemens ProductCERT SSA-093430 · 7 productsUpdate to V3.0.1.1 or later version The update is available from Siemens Online Software Delivery (OSD).

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB

Sources

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2023-10-18
Last Modified
2026-06-17
NVD status
Modified

Frequently asked questions

What is CVE-2023-38545?

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.

Is CVE-2023-38545 actively exploited?

A proof-of-concept exploit exists for CVE-2023-38545, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2023-38545?

CVE-2023-38545 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running curl? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month