
CVE catalog
CVE-2026-31870
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.37.1, when a cpp-httplib client uses the streaming API (httplib::stream::Get, httplib::stream::Post, etc.),
- Severity
- High · CVSS 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.46% · Oct 25, 2026
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.37.1, when a cpp-httplib client uses the streaming API (httplib::stream::Get, httplib::stream::Post, etc.), the library calls std::stoull() directly on the Content-Length header value received from the server with no input validation and no exception handling. std::stoull throws std::invalid_argument for non-numeric strings and std::out_of_range for values exceeding ULLONG_MAX. Since nothing catches these exceptions, the C++ runtime calls std::terminate(), which kills the process with SIGABRT. Any server the client connects to — including servers reached via HTTP redirects, third-party APIs, or man-in-the-middle positions can crash the client application with a single HTTP response. No authentication is required. No interaction from the end user is required. The crash is deterministic and immediate. This vulnerability is fixed in 0.37.1.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | cpp-httplib | sid | 0.41.0+ds-3 | fixed |
| Debian | cpp-httplib | forky | 0.41.0+ds-3 | fixed |
| Debian | cpp-httplib | trixie | 0.18.7-1+deb13u1 | vulnerable |
| Debian | cpp-httplib | trixie-security | 0.18.7-1+deb13u1 | vulnerable |
| Debian | cpp-httplib | bookworm | 0.11.4+ds-1+deb12u1 | vulnerable |
| Cpe | cpp-httplib | Not reported | Not reported | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | cpp-httplib | source | sid | 0.41.0+ds-3 | not yet assigned | Not reported | [1130505] |
| Debian | cpp-httplib | source | forky | 0.41.0+ds-3 | not yet assigned | Not reported | [1130505] |
| Debian | cpp-httplib | source | trixie | (unfixed) | not yet assigned | Not reported | [1130505] |
| Debian | cpp-httplib | source | bookworm | (unfixed) | not yet assigned | Not reported | [1130505] |
Notes
[trixie] cpp-httplib: Minor issue [bookworm] cpp-httplib: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [libcpp-httplib0.11]Affected
Source package: [cpp-httplib]
Details (2)
0.11.4+ds-1+deb12u1· amd64 · bookwormAffected
nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12
0.11.4+ds-1+deb12u1· arm64 · bookwormAffected
nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12
- [libcpp-httplib-dev]Affected
Source package: [cpp-httplib]
Details (2)
0.11.4+ds-1+deb12u1· amd64 · bookwormAffected
nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12
0.11.4+ds-1+deb12u1· arm64 · bookwormAffected
nvd · cpp-httplib · debian · bookworm; nvd · cpp-httplib · debian · 12
[Debian 13 (Trixie)]
- [libcpp-httplib0.18]Affected
Source package: [cpp-httplib]
Details (4)
0.18.7-1+deb13u1· amd64 · trixieAffected
nvd · cpp-httplib · debian · 13
0.18.7-1+deb13u1· arm64 · trixieAffected
nvd · cpp-httplib · debian · 13
0.18.7-1+deb13u1· amd64 · trixie-securityAffected
nvd · cpp-httplib · debian · 13
0.18.7-1+deb13u1· arm64 · trixie-securityAffected
nvd · cpp-httplib · debian · 13
- [libcpp-httplib0.41]Affected
Source package: [cpp-httplib]
Details (2)
0.41.0+ds-3~bpo13+1· amd64 · trixie-backportsAffected
nvd · cpp-httplib · debian · 13
0.41.0+ds-3~bpo13+1· arm64 · trixie-backportsAffected
nvd · cpp-httplib · debian · 13
- [libcpp-httplib-dev]Affected
Source package: [cpp-httplib]
Details (6)
0.18.7-1+deb13u1· amd64 · trixieAffected
nvd · cpp-httplib · debian · 13
0.18.7-1+deb13u1· arm64 · trixieAffected
nvd · cpp-httplib · debian · 13
0.41.0+ds-3~bpo13+1· amd64 · trixie-backportsAffected
nvd · cpp-httplib · debian · 13
0.41.0+ds-3~bpo13+1· arm64 · trixie-backportsAffected
nvd · cpp-httplib · debian · 13
0.18.7-1+deb13u1· amd64 · trixie-securityAffected
nvd · cpp-httplib · debian · 13
0.18.7-1+deb13u1· arm64 · trixie-securityAffected
nvd · cpp-httplib · debian · 13
Observed:
References
- [https://nvd.nist.gov/vuln/detail/CVE-2026-31870]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-31870]
- [https://security-tracker.debian.org/tracker/CVE-2026-31870]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31870.json]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]