CVE Explorer
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.), 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 thes
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"cpp-httplib","vendor":"yhirose","versions":[{"status":"affected","version":"< 0.37.1"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:42577aedebd7e32f05bd61e93499a4fbc1a1d4d3999b17b777a310d164fb2e22 · sha256:b500493aafced8d0… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:42577aedebd7e32f05bd61e93499a4fbc1a1d4d3999b17b777a310d164fb2e22 · sha256:b500493aafced8d0… · /containers/cna/metrics/0/cvssV3_1
CWE assertions
1 source assertion{"cweId":"CWE-248","description":"CWE-248: Uncaught Exception","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:42577aedebd7e32f05bd61e93499a4fbc1a1d4d3999b17b777a310d164fb2e22 · sha256:b500493aafced8d0… · /containers/cna/problemTypes/0/descriptions/0
Source references
1 source assertion{"name":"https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-39q5-hh6x-jpxx","tags":["x_refsource_CONFIRM"],"url":"https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-39q5-hh6x-jpxx"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:42577aedebd7e32f05bd61e93499a4fbc1a1d4d3999b17b777a310d164fb2e22 · sha256:b500493aafced8d0… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.