C++ HTTP/HTTPS Library Vulnerability in cpp-httplib by yhirose
CVE-2026-46527
8.7HIGH
What is CVE-2026-46527?
Prior to version 0.44.0, cpp-httplib contains a flaw whereby an attacker can exploit the Server::set_trusted_proxies() function by sending an HTTP request with an X-Forwarded-For header that includes invalid IP segments. This leads to a situation where get_client_ip() attempts to access the first element of an empty vector, resulting in undefined behavior. Commonly, this manifests as a crash of the application, thereby causing a denial of service. Users are advised to upgrade to version 0.44.0 or later to mitigate this issue.
Affected Version(s)
cpp-httplib < 0.44.0
