{"id":"CVE-2026-46527","aliases":["CVE-2026-46527"],"related":[],"kind":"vulnerability","state":"published","title":"cpp-httplib: Malicious `X-Forwarded-For` Under Trusted-Proxy Configuration Triggers Empty `vector::front()`, Leading to Undefined Behavior and Server Crash","summary":"cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.44.0, When the server has called Server::set_trusted_proxies() with a non-empty trusted-proxy list, an attacker can send an HTTP request that includes an X-Forwarded-For header whose value parses to no valid IP segments. The code path then executes get_client_ip(), which calls front() on an empty std::vector—undefined behavior in C++. On typical implementations this manifests as abnormal process termination (denial of service). With Sanitizers enabled, you get an explicit runtime diagnostic. This vulnerability is fixed in 0.44.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.44.0, When the server has called Server::set_trusted_proxies() with a non-empty trusted-proxy list, an attacker can send an HTTP request that includes an X-Forwarded-For header whose value parses to no valid IP segments. The code path then executes get_client_ip(), which calls front() on an empty std::vector—undefined behavior in C++. On typical implementations this manifests as abnormal process termination (denial of service). With Sanitizers enabled, you get an explicit runtime diagnostic. This vulnerability is fixed in 0.44.0.","source":"cvelist"},{"lang":"es","text":"cpp-httplib es una biblioteca HTTP/HTTPS multiplataforma de un solo archivo de cabecera C++11. Antes de 0.44.0, cuando el servidor ha llamado a Server::set_trusted_proxies() con una lista de proxies de confianza no vacía, un atacante puede enviar una solicitud HTTP que incluye una cabecera X-Forwarded-For cuyo valor se analiza como ningún segmento IP válido. La ruta del código entonces ejecuta get_client_ip(), que llama a front() en un std::vector vacío -comportamiento indefinido en C++. En implementaciones típicas, esto se manifiesta como terminación anormal del proceso (denegación de servicio). Con los Sanitizers habilitados, se obtiene un diagnóstico explícito en tiempo de ejecución. Esta vulnerabilidad está corregida en 0.44.0.","source":"nvd"}],"published":"2026-05-29T19:18:26.615Z","modified":"2026-07-22T06:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"version":"< 0.44.0","status":"affected"}],"vendor":"yhirose","product":"cpp-httplib","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"0.44.0"}],"vendor":"yhirose","product":"cpp-httplib","cpe":"cpe:2.3:a:yhirose:cpp-httplib:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-hg3g-vrg8-578g","tags":["exploit","mitigation","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-01T13:52:10.500Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46527","url":"https://www.cve.org/CVERecord?id=CVE-2026-46527","licence":"CVE Terms of Use","modified":"2026-06-01T13:52:30.508Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46527","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46527","licence":"Public domain","modified":"2026-07-22T06:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:23.371Z","epss":{"score":0.00327,"percentile":0.27879,"date":"2026-12-01T12:00:22.000Z"}}