curl and libcurl are vulnerable to a heap buffer overflow in the SOCKS5 proxy handshake. This occurs when curl is configured to use a SOCKS5 proxy to resolve hostnames. If the hostname is longer than 255 bytes, curl may switch to local name resolving and incorrectly copy the oversized hostname into a buffer, leading to a potential crash or remote code execution. The vulnerability also affects MySQL versions 5.7.43 and earlier, 8.0.34 and earlier, and 8.1.0 and earlier.