{"id":"CVE-2026-45352","aliases":["DEBIAN-CVE-2026-45352","EUVD-2026-33425","GHSA-h6wq-j5mv-f3q8","OESA-2026-2585","OESA-2026-2586","UBUNTU-CVE-2026-45352"],"status":"published","title":"cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00327,"percentile":0.2603,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-1285","CWE-20","CWE-770"],"published":"2026-05-29T19:14:08Z","modified":"2026-10-28T02:30:32Z","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"]}],"products":[{"vendor":"yhirose","product":"cpp-httplib"}],"references":[{"url":"https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8","tags":["x_refsource_CONFIRM","exploit","Exploit","Vendor Advisory","advisory","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45352.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45352","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-45352","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-45372","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46527","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-45352","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-45352","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-45352","title":"cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","status":"published","published":"2026-05-29T19:14:08.065Z","modified":"2026-06-02T01:52:12.106Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-20","CWE-1285","CWE-770"],"updated_at":"2026-11-02T13:46:43.922571Z"}],"euvd":[{"id":"EUVD-2026-33425","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","status":"published","published":"2026-05-29T19:14:08Z","modified":"2026-06-02T01:52:12Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T18:20:57.453624Z"}],"nvd":[{"id":"CVE-2026-45352","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","status":"published","published":"2026-05-29T20:16:26.14Z","modified":"2026-07-22T06:10:00.17Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","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-20","CWE-770","CWE-1285"],"updated_at":"2026-11-02T14:12:21.635958Z"}],"osv":[{"id":"CVE-2026-45352","title":"cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","status":"published","published":"2026-05-29T19:14:08.065Z","modified":"2026-10-28T02:30:32.099770713Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-1285","CWE-20","CWE-770"],"updated_at":"2026-11-02T15:45:05.525666Z"},{"id":"DEBIAN-CVE-2026-45352","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","status":"published","published":"2026-05-29T20:16:26.14Z","modified":"2026-10-01T03:03:05.898769491Z","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:55.669088Z"},{"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-45352","description":"cpp-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(\"-2\", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of \"-1\"), but any other negative value such as \"-2\" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.","status":"published","published":"2026-05-29T20:16:00Z","modified":"2026-10-17T12:58:23.02370712Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"},{"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:26.396868Z"}]}}
