CVE-2026-45352 cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding
- Published
- Updated
- Exploit status
- No public exploit known
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| yhirose cpp-httplib | = < 0.43.4 | No fix listed |
| debian/cpp-httplib(Debian:12) | All versions | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-1+deb12u1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.13.1+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.1+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.1+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.2+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.3+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.3+ds-1.1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.3+ds-1.1~exp1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.15.3+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.15.3+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.15.3+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.16.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.16.3+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.16.3+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.18.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.18.7-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.20.1+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.25.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.26.0+ds-2 | No fix listed |
Show 28 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-3~bpo13+1 | No fix listed |
| debian/cpp-httplib(Debian:13) | All versions | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.18.7-1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.18.7-1+deb13u1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.20.1+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.25.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.26.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-3~bpo13+1 | No fix listed |
| debian/cpp-httplib(Debian:14) | All versions | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.18.7-1 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.20.1+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.25.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.26.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-3~bpo13+1 | No fix listed |
| ubuntu/cpp-httplib(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/cpp-httplib(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/cpp-httplib(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/cpp-httplib(Ubuntu:26.10) | All versions | No fix listed |
| yhirose cpp-httplib | < 0.43.4 | 0.43.4 |
References
- https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8 exploit vendor-advisory
- Debian Security Tracker CVE-2026-45352 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking