Memory Allocation Vulnerability in cpp-httplib by Yhirose
CVE-2026-45352
5.3MEDIUM
What is CVE-2026-45352?
The cpp-httplib library, which is a widely used C++11 header-only HTTP/HTTPS library, contains a vulnerability that allows negative chunk-sizes in chunked Transfer-Encoding, leading to unbounded memory allocation and potential process crashes. This issue arises in the ChunkedDecoder::read_payload function due to improper handling of negative values passed to std::strtoul(). Although the function rejects ULONG_MAX, other negative values like '-2' are accepted, resulting in dangerous behavior during data processing. This vulnerability has been addressed in version 0.43.4.
Affected Version(s)
cpp-httplib < 0.43.4
