{"id":"CVE-2026-46527","aliases":["DEBIAN-CVE-2026-46527","EUVD-2026-33426","GHSA-hg3g-vrg8-578g","OESA-2026-2585","OESA-2026-2586","UBUNTU-CVE-2026-46527","openSUSE-SU-2026:10994-1"],"status":"published","title":"cpp-httplib: Malicious `X-Forwarded-For` Under Trusted-Proxy Configuration Triggers Empty `vector::front()`, Leading to Undefined Behavior and Server Crash","description":"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.","severity":{"version":"4.0","score":8.7,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00327,"percentile":0.26163,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-476"],"published":"2026-05-29T19:18:26Z","modified":"2026-10-28T02:31:15Z","affected":[{"source":"osv","ecosystem":"Debian:12","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.11.4+ds-1","0.11.4+ds-1+deb12u1","0.11.4+ds-2","0.11.4+ds-3","0.13.1+ds-1","0.14.0+ds-1","0.14.1+ds-1","0.14.1+ds-2","0.14.2+ds-1","0.14.3+ds-1","0.14.3+ds-1.1","0.14.3+ds-1.1~exp1","0.15.3+ds-1","0.15.3+ds-2","0.15.3+ds-3","0.16.0+ds-1","0.16.3+ds-1","0.16.3+ds-2","0.18.0+ds-1","0.18.7-1","0.20.1+ds-3","0.25.0+ds-1","0.26.0+ds-2","0.41.0+ds-1","0.41.0+ds-2","0.41.0+ds-3","0.41.0+ds-3~bpo13+1"]},{"source":"osv","ecosystem":"Debian:13","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.18.7-1+deb13u1","0.20.1+ds-3","0.25.0+ds-1","0.26.0+ds-2","0.41.0+ds-1","0.41.0+ds-2","0.41.0+ds-3","0.41.0+ds-3~bpo13+1"]},{"source":"osv","ecosystem":"Debian:14","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.20.1+ds-3","0.25.0+ds-1","0.26.0+ds-2","0.41.0+ds-1","0.41.0+ds-2","0.41.0+ds-3","0.41.0+ds-3~bpo13+1"]},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP3","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.0-1.oe2403sp3"}]}],"bundled":3},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP1","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.0-1.oe2403sp1"}]}],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.9+ds-1","0.9.10+ds-1","0.10.1+ds-1","0.10.2+ds-1","0.10.3+ds-1","0.10.3+ds-1ubuntu0.1~esm1","0.10.3+ds-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.13.1+ds-1ubuntu1","0.14.3+ds-1","0.14.3+ds-1.1","0.14.3+ds-1.1build1","0.14.3+ds-1.1build2","0.14.3+ds-1.1ubuntu0.1~esm1","0.14.3+ds-1.1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.18.7-1ubuntu0.25.10.1","0.18.7-1ubuntu0.25.10.2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.26.0+ds-2ubuntu3","0.26.0+ds-2ubuntu4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.26.0+ds-2ubuntu2","0.26.0+ds-2ubuntu3","0.26.0+ds-2ubuntu3+esm1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.1-1.1"}]}],"bundled":2}],"products":[{"vendor":"yhirose","product":"cpp-httplib"}],"references":[{"url":"https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-hg3g-vrg8-578g","tags":["x_refsource_CONFIRM","exploit","Exploit","Mitigation","Vendor Advisory","advisory","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46527.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46527","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-46527","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-2585","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45352","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45372","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-2586","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-46527","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-46527","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-45372","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-46527","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-46527","title":"cpp-httplib: Malicious `X-Forwarded-For` Under Trusted-Proxy Configuration Triggers Empty `vector::front()`, Leading to Undefined Behavior and Server Crash","description":"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.","status":"published","published":"2026-05-29T19:18:26.615Z","modified":"2026-06-01T13:52:30.508Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high","assessor":"cna"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T13:47:06.353366Z"}],"euvd":[{"id":"EUVD-2026-33426","description":"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.","status":"published","published":"2026-05-29T19:18:26Z","modified":"2026-06-01T13:52:30Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"}],"updated_at":"2026-11-02T18:20:58.729223Z"}],"nvd":[{"id":"CVE-2026-46527","description":"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.","status":"published","published":"2026-05-29T20:16:28.137Z","modified":"2026-07-22T06:10:00.17Z","cvss":[{"version":"4.0","score":8.7,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:12:21.635958Z"}],"osv":[{"id":"CVE-2026-46527","title":"cpp-httplib: Malicious `X-Forwarded-For` Under Trusted-Proxy Configuration Triggers Empty `vector::front()`, Leading to Undefined Behavior and Server Crash","description":"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.","status":"published","published":"2026-05-29T19:18:26.615Z","modified":"2026-10-28T02:31:15.083059745Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T15:45:05.870292Z"},{"id":"DEBIAN-CVE-2026-46527","description":"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.","status":"published","published":"2026-05-29T20:16:28.137Z","modified":"2026-10-01T03:03:06.78660225Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:56.025495Z"},{"id":"OESA-2026-2585","title":"cpp-httplib security update","description":"A C++11 single-file header-only cross platform HTTP/HTTPS library. It\u0026amp;apos;s extremely easy to setup. Just include httplib.h file in your code!\r\n\r\nSecurity Fix(es):\n\ncpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.43.4, negative chunk-size in chunked Transfer-Encoding causes unbounded memory allocation and process crash. The ChunkedDecoder::read_payload function in cpp-httplib (httplib.h) parses the chunk-size field of HTTP chunked transfer encoding using std::strtoul(). Per the C standard (§7.22.1.4), strtoul silently accepts a leading minus sign, performing unsigned wrap-around: strtoul(\u0026quot;-2\u0026quot;, …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library\u0026apos;s only guard (line 12833) rejects ULONG_MAX (the result of \u0026quot;-1\u0026quot;), but any other negative value such as \u0026quot;-2\u0026quot; passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server\u0026apos;s read loop consumes from the network. This vulnerability is fixed in 0.43.4.(CVE-2026-45352)\n\ncpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.44.0, when cpp-httplib\u0026apos;s server parses an incoming request, it applies percent-decoding to every header value except Location and Referer. The validity check (is_field_value) is run before decoding, so encoded %0D%0A passes the check and is then expanded to a literal \\r\\n byte pair inside the stored header value. This vulnerability is fixed in 0.44.0.(CVE-2026-45372)\n\ncpp-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.(CVE-2026-46527)","status":"published","published":"2026-06-05T11:11:31Z","modified":"2026-08-18T01:20:03.39616218Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L","level":"critical"}],"updated_at":"2026-11-02T15:52:46.449097Z"},{"id":"OESA-2026-2586","title":"cpp-httplib security update","description":"A C++11 single-file header-only cross platform HTTP/HTTPS library. It\u0026amp;apos;s extremely easy to setup. Just include httplib.h file in your code!\r\n\r\nSecurity Fix(es):\n\ncpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.43.4, negative chunk-size in chunked Transfer-Encoding causes unbounded memory allocation and process crash. The ChunkedDecoder::read_payload function in cpp-httplib (httplib.h) parses the chunk-size field of HTTP chunked transfer encoding using std::strtoul(). Per the C standard (§7.22.1.4), strtoul silently accepts a leading minus sign, performing unsigned wrap-around: strtoul(\u0026quot;-2\u0026quot;, …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library\u0026apos;s only guard (line 12833) rejects ULONG_MAX (the result of \u0026quot;-1\u0026quot;), but any other negative value such as \u0026quot;-2\u0026quot; passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server\u0026apos;s read loop consumes from the network. This vulnerability is fixed in 0.43.4.(CVE-2026-45352)\n\ncpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.44.0, when cpp-httplib\u0026apos;s server parses an incoming request, it applies percent-decoding to every header value except Location and Referer. The validity check (is_field_value) is run before decoding, so encoded %0D%0A passes the check and is then expanded to a literal \\r\\n byte pair inside the stored header value. This vulnerability is fixed in 0.44.0.(CVE-2026-45372)\n\ncpp-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.(CVE-2026-46527)","status":"published","published":"2026-06-05T11:11:31Z","modified":"2026-08-18T01:20:03.53956514Z","cvss":[{"version":"3.1","score":9.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L","level":"critical"}],"updated_at":"2026-11-02T15:52:46.449097Z"},{"id":"UBUNTU-CVE-2026-46527","description":"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.","status":"published","published":"2026-05-29T20:16:00Z","modified":"2026-10-17T13:00:13.003573652Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:56:30.797112Z"},{"id":"openSUSE-SU-2026:10994-1","title":"cpp-httplib-devel-0.46.1-1.1 on GA media","description":"These are all security issues fixed in the cpp-httplib-devel-0.46.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-06-11T00:00:00Z","modified":"2026-06-12T08:45:08.535024559Z","updated_at":"2026-11-02T16:58:38.95195Z"}]}}
