CVE catalog

CVE-2026-45352

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

[CVE catalog]

Severity
Medium · CVSS 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Published
Source
[NVD] · [CVE record]
EPSS
0.33% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiancpp-httplibsid0.41.0+ds-3vulnerable
Debiancpp-httplibforky0.41.0+ds-3vulnerable
Debiancpp-httplibtrixie0.18.7-1+deb13u1vulnerable
Debiancpp-httplibtrixie-security0.18.7-1+deb13u1vulnerable
Debiancpp-httplibbookworm0.11.4+ds-1+deb12u1vulnerable
Cpecpp-httplibNot reportedNot reportedvulnerable
Cpecpp-httplibNot reported0.43.4fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiancpp-httplibsourcesid(unfixed)not yet assignedNot reported[1138578]
Debiancpp-httplibsourceforky(unfixed)not yet assignedNot reported[1138578]
Debiancpp-httplibsourcetrixie(unfixed)not yet assignedNot reported[1138578]
Debiancpp-httplibsourcebookworm(unfixed)not yet assignedNot reported[1138578]
Cpecpp-httplibcpeNot reported0.43.4Not reportedNot reportedNot reported

[Debian bug #1138578]

Notes

[trixie] cpp-httplib: Minor issue [bookworm] cpp-httplib: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Source package: [cpp-httplib]

    Details (2)
    • 0.11.4+ds-1+deb12u1 · amd64 · bookworm

      Affected

      nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12

    • 0.11.4+ds-1+deb12u1 · arm64 · bookworm

      Affected

      nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12

  • Source package: [cpp-httplib]

    Details (2)
    • 0.11.4+ds-1+deb12u1 · amd64 · bookworm

      Affected

      nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12

    • 0.11.4+ds-1+deb12u1 · arm64 · bookworm

      Affected

      nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12

[Debian 13 (Trixie)]

  • Source package: [cpp-httplib]

    Details (4)
    • 0.18.7-1+deb13u1 · amd64 · trixie

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.18.7-1+deb13u1 · arm64 · trixie

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.18.7-1+deb13u1 · amd64 · trixie-security

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.18.7-1+deb13u1 · arm64 · trixie-security

      Affected

      nvd · cpp-httplib · debian · 13

  • Source package: [cpp-httplib]

    Details (2)
    • 0.41.0+ds-3~bpo13+1 · amd64 · trixie-backports

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.41.0+ds-3~bpo13+1 · arm64 · trixie-backports

      Affected

      nvd · cpp-httplib · debian · 13

  • Source package: [cpp-httplib]

    Details (6)
    • 0.18.7-1+deb13u1 · amd64 · trixie

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.18.7-1+deb13u1 · arm64 · trixie

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.41.0+ds-3~bpo13+1 · amd64 · trixie-backports

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.41.0+ds-3~bpo13+1 · arm64 · trixie-backports

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.18.7-1+deb13u1 · amd64 · trixie-security

      Affected

      nvd · cpp-httplib · debian · 13

    • 0.18.7-1+deb13u1 · arm64 · trixie-security

      Affected

      nvd · cpp-httplib · debian · 13

Observed:

References