CVE-2023-38545

CVE-2023-38545 is a critical-severity vulnerability in Haxx Libcurl with a CVSS 3.x base score of 9.8. Its EPSS exploit-prediction score of 78% places it in the 100th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-787.

Key facts

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.

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.
How severe is CVE-2023-38545?
CVE-2023-38545 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2023-38545 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 78% (100th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2023-38545?
CVE-2023-38545 primarily affects Haxx Libcurl. In total, 14 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2023-38545?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
When was CVE-2023-38545 published?
CVE-2023-38545 was published on 2023-10-18 and last updated on 2026-06-17.

References

Affected products (14)

More vulnerabilities in Haxx Libcurl

All CVEs affecting Haxx Libcurl →

Other CWE-787 (Out-of-bounds Write) vulnerabilities

Browse all CWE-787 (Out-of-bounds Write) vulnerabilities →