CVE-2026-28435: Payload size limit bypass via gzip decompression in ContentReader (streaming) allows oversized request bodies in cpp-httplib
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.35.0, cpp-httplib (httplib.h) does not enforce Server::setpayloadmaxlength() on the decompressed request body when using HandlerWithContentReader (streaming ContentReader) with Content-Encoding: gzip (or other supported encodings). A small compressed payload can expand beyond the configured payload limit and be processed by the application, enabling a payload size limit bypass and potential denial of service (CPU/memory exhaustion). This vulnerability is fixed in 0.35.0.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-28435?
CVE-2026-28435 is categorized as a high severity vulnerability due to the potential for oversized request bodies leading to denial of service attacks.
How do I fix CVE-2026-28435?
To fix CVE-2026-28435, update cpp-httplib to version 0.35.0 or later where payload size limits are enforced.
What kind of attacks can CVE-2026-28435 lead to?
CVE-2026-28435 can lead to denial of service (DoS) attacks by allowing oversized request bodies that can exhaust resources.
Which versions of cpp-httplib are affected by CVE-2026-28435?
CVE-2026-28435 affects all versions of cpp-httplib prior to 0.35.0.
Is there a workaround for CVE-2026-28435?
Implementing your own checks for payload size prior to upgrading cpp-httplib could serve as a temporary workaround for CVE-2026-28435.