CVE-2023-38545
Reported by hackerone · Published October 18, 2023
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| libcurl | conan.io | 8.4.0 |
| curl | Amazon Linux | 8.3.0-1.amzn2023.0.2, 8.3.0-1.amzn2.0.4 |
| lib32-libcurl-gnutls | Arch Linux | 8.4.0-1 |
| curl | Alpine | 8.4.0-r0 |
| libcurl-compat | Arch Linux | 8.4.0-1 |
| curl | Chainguard | 8.4.0-r0 |
| lib32-libcurl-compat | Arch Linux | 8.4.0-1 |
| curl | Wolfi | 8.4.0-r0 |
| libcurl-minimal | Amazon Linux | 8.3.0-1.amzn2023.0.2 |
| libcurl | Amazon Linux | 8.3.0-1.amzn2023.0.2, 8.3.0-1.amzn2.0.4 |
| libcurl-devel | Amazon Linux | 8.3.0-1.amzn2023.0.2, 8.3.0-1.amzn2.0.4 |
| curl-minimal | Amazon Linux | 8.3.0-1.amzn2023.0.2 |
15 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| curl | curl | 8.4.0, 7.69.0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.5 |
| Siemens | RUGGEDCOM APE1808 | 0 |
| amazon:2023 | curl | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.5 |
| arch | lib32-libcurl-gnutls | 0 |
| alpine | curl | 0 |
| arch | libcurl-compat | 0 |
| chainguard | curl | 0 |
| arch | lib32-libcurl-compat | 0 |
| curl | curl | 7.69.0, 8.4.0 |
| wolfi | curl | 0 |
| amazon:2 | curl | 0 |
| amazon:2023 | libcurl-minimal | 0 |
| amazon:2023 | libcurl | 0 |
| amazon:2023 | libcurl-devel | 0 |
| amazon:2023 | curl-minimal | 0 |
| arch | libcurl-gnutls | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.5 |
| wolfi | curl-rustls | 0 |
…and 6 more
Timeline
- Oct 11, 2023 PoC Published (2 in total, the first dated here)
- Oct 18, 2023 EPSS Score (30 in total, the first dated here)
- Oct 18, 2023 CVE Published
- Mar 17, 2026 Security Advisory (39 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (32 in total, the first dated here)
- Aug 6, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-38545
vulnetix vdb fixes CVE-2023-38545
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-38545/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- CVE-2023-38545 exploit
- CVE-2023-38545-libcurl-SOCKS5-heap-buffer-overflow exploit
- CVE-2023-38545-sample exploit
- CVE-2023-38545 exploit
- CVE-2023-38545 exploit
- NS-Project-2024-Spring exploit
- https://nvd.nist.gov/vuln/detail/CVE-2023-38545 advisory
…and 8 more