7.5high
Payload size limit bypass via gzip decompression in ContentReader (streaming) allows oversized request bodies in cpp-httplib
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.74% (higher than 51% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
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::set_payload_max_length() 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
| Product or package | Versions | Reported by |
|---|---|---|
| yhirose cpp-httplib | < 0.35.0, before 0.35.0 | CVE List, NVD |
Classification
What each source says
CVE List
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::set_payload_max_length() 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.
NVD (es)
cpp-httplib es una librería HTTP/HTTPS multiplataforma de un solo archivo de cabecera C++11. Antes de la versión 0.35.0, cpp-httplib (httplib.h) no aplica Server::set_payload_max_length() en el cuerpo de la solicitud descomprimido al usar HandlerWithContentReader (ContentReader de transmisión) con Content-Encoding: gzip (u otras codificaciones compatibles). Una pequeña carga útil comprimida puede expandirse más allá del límite de carga útil configurado y ser procesada por la aplicación, lo que permite una omisión del límite de tamaño de la carga útil y una potencial denegación de servicio (agotamiento de CPU/memoria). Esta vulnerabilidad está corregida en la versión 0.35.0.
References
| https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-xvfx-w463-6fpp | exploit, mitigation, vendor-advisory | |
| https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8 | patch | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-28435 changed 2026-03-04 | CVE Terms of Use |
| NVD | CVE-2026-28435 changed 2026-06-17 | Public domain |