CVE-2023-38545: cURL SOCKS5 Flaw Causes Heap Buffer Overflow

· Original article ↗

Summary

CVE-2023-38545 affects libcurl 7.69.0–8.3.0 and can cause a heap buffer overflow during a SOCKS5 handshake. Upgrade to 8.4.0 or avoid the affected SOCKS5 hostname proxy settings.

Key points

  • The flaw occurs when libcurl uses a SOCKS5 proxy and a slow handshake causes an excessively long hostname to be copied into a buffer.
  • Affected versions are libcurl 7.69.0 through 8.3.0; cURL 8.4.0 includes the fix.
  • Exploitation requires an application using libcurl with a SOCKS5 proxy to make a request to a malicious URL.
  • The article says denial of service may be possible, but that no remote-code-execution exploit was known at the time of its assessment.
  • The article assessed the likelihood of exploitation in the wild as relatively low at that time.
  • Recommended mitigation is to upgrade to 8.4.0 or later; alternatives include avoiding CURLPROXY_SOCKS5_HOSTNAME and socks5h:// proxy settings.
  • For Windows instances, the article recommends waiting for an official Microsoft patch rather than manually patching cURL.

Article Details

Vulnerability Types
  • Heap-based buffer overflow in the SOCKS5 proxy handshake
Severity
High
Affected Versions
  • libcurl 7.69.0 to 8.3.0
Exploitation Status
unknown
Exploit Availability
unknown
Patch Status
available
Workarounds
  • Do not use CURLPROXY_SOCKS5_HOSTNAME proxies with curl.
  • Do not set a proxy environment variable to socks5h://.

CVE

People

Products

Related Articles