CVE-2026-45352
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.
INFO
Published Date :
May 29, 2026, 8:16 p.m.
Last Modified :
July 22, 2026, 6:10 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | MEDIUM | MITRE-CVE | ||||
| CVSS 3.1 | HIGH | [email protected] |
Solution
- Update cpp-httplib to version 0.43.4 or later.
- Ensure chunked transfer encoding inputs are validated.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-45352.
| URL | Resource |
|---|---|
| https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8 | Exploit Vendor Advisory |
| https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8 | Exploit Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-45352 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-45352
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-45352 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-45352 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Jul. 22, 2026
Action Type Old Value New Value Added Translation Title: cpp-httplib de yhirose, Description: cpp-httplib es una biblioteca HTTP/HTTPS multiplataforma de C++11 de un solo archivo de solo encabezado. Antes de la 0.43.4, un tamaño de fragmento negativo en la codificación de transferencia fragmentada (chunked Transfer-Encoding) causa una asignación de memoria ilimitada y la caída del proceso. La función ChunkedDecoder::read_payload en cpp-httplib (httplib.h) analiza el campo de tamaño de fragmento de la codificación de transferencia fragmentada HTTP utilizando std::strtoul(). Según el estándar C (§7.22.1.4), strtoul acepta silenciosamente un signo menos inicial, realizando un desbordamiento sin signo: strtoul('-2', ..., 16) devuelve ULONG_MAX ? 1 (0xFFFFFFFFFFFFFFFE). La única protección de la biblioteca (línea 12833) rechaza ULONG_MAX (el resultado de '-1'), pero cualquier otro valor negativo como '-2' pasa la validación. El valor casi máximo resultante se almacena en chunk_remaining y controla cuántos bytes el bucle de lectura del servidor consume de la red. Esta vulnerabilidad está corregida en la 0.43.4. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'yhirose', 'product': 'cpp-httplib', 'versions': [{'status': 'affected', 'version': '< 0.43.4'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-45352', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'yes'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-02T01:51:40.756562Z'} -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 02, 2026
Action Type Old Value New Value Added Reference https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8 -
Initial Analysis by [email protected]
Jun. 01, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Added CPE Configuration OR *cpe:2.3:a:yhirose:cpp-httplib:*:*:*:*:*:*:*:* versions up to (excluding) 0.43.4 Added Reference Type GitHub, Inc.: https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8 Types: Exploit, Vendor Advisory -
New CVE Received by [email protected]
May. 29, 2026
Action Type Old Value New Value Added 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. Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Added CWE CWE-20 Added CWE CWE-770 Added CWE CWE-1285 Added Reference https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8