Skip to main content

Heap-based Buffer Overflow


Severity High
Score 7.5/10


curl and libcurl, in versions 7.69.0 through 8.3.0, are vulnerable to a heap-based buffer in the SOCKS5 proxy handshake. It is possible to bypass the maximum hostname byte length when passing the hostname to the SOCKS5 proxy. If the hostname is detected to be longer than 255 bytes, curl switches to local name resolving and instead passes on the resolved address only to the proxy. Due to a 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 hostname to the target buffer instead of copying just the resolved address there.

  • LOW
  • NONE
  • NONE
  • NONE
  • NONE
  • HIGH

CWE-122 - Heap-based Buffer Overflow

A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

Advisory Timeline

  • Published