CVE-2026-45352
published medium CVSS 3.1 · 5.3cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| yhirose | — | cpp-httplib< 0.43.4 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| yhirose | cpp-httplib | < 0.43.4 (affected) | GitHub_M · cna |
Weaknesses
3- CWE-20 CWE-20: Improper Input Validation
- CWE-1285 CWE-1285: Improper Validation of Specified Index, Position, or Offset in Input
- CWE-770 CWE-770: Allocation of Resources Without Limits or Throttling
References
1Provider assertions
2GitHub_M · cna
cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- abbecb0d87db3002359061e437e671e081d80a9444349f7bb07784e493740e51
- Ingested
- 23 Sep 2026, 09:15:37 UTC
- Source record
- Official CVE record