yhirose cpp-httplib up to 0.37.0 Streaming API std::stoull Content-Length uncaught exception
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.3 | $0-$5k | 0.00 |
Summary
A vulnerability was found in yhirose cpp-httplib up to 0.37.0. It has been classified as problematic. This affects the function std::stoull of the component Streaming API. The manipulation of the argument Content-Length leads to uncaught exception.
This vulnerability is referenced as CVE-2026-31870. Remote exploitation of the attack is possible. No exploit is available.
Upgrading the affected component is recommended.
Details
A vulnerability was found in yhirose cpp-httplib up to 0.37.0. It has been rated as problematic. This issue affects the function std::stoull of the component Streaming API. The manipulation of the argument Content-Length with an unknown input leads to a uncaught exception vulnerability. Using CWE to declare the problem leads to CWE-248. An exception is thrown from a function, but it is not caught. Impacted is availability. The summary by CVE is:
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.
It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2026-31870 since 03/09/2026. The exploitation is known to be easy. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details of the vulnerability are known, but there is no available exploit.
The vulnerability scanner Nessus provides a plugin with the ID 303248 (Fedora 42 : cpp-httplib (2026-6ed9c65eaf)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 0.37.1 eliminates this vulnerability.
The vulnerability is also documented in the databases at Tenable (303248) and EUVD (EUVD-2026-11275). Be aware that VulDB is the high quality source for vulnerability data.
Product
Vendor
Name
Version
- 0.1
- 0.2
- 0.3
- 0.4
- 0.5
- 0.6
- 0.7
- 0.8
- 0.9
- 0.10
- 0.11
- 0.12
- 0.13
- 0.14
- 0.15
- 0.16
- 0.17
- 0.18
- 0.19
- 0.20
- 0.21
- 0.22
- 0.23
- 0.24
- 0.25
- 0.26
- 0.27
- 0.28
- 0.29
- 0.30
- 0.31
- 0.32
- 0.33
- 0.34
- 0.35
- 0.36
- 0.37.0
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 6.4VulDB Meta Temp Score: 6.3
VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 7.5
CNA Vector (GitHub_M): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Uncaught exceptionCWE: CWE-248
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 303248
Nessus Name: Fedora 42 : cpp-httplib (2026-6ed9c65eaf)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: cpp-httplib 0.37.1
Timeline
03/09/2026 CVE reserved03/11/2026 Advisory disclosed
03/11/2026 VulDB entry created
03/22/2026 VulDB entry last update
Sources
Product: github.comAdvisory: GHSA-39q5-hh6x-jpxx
Status: Confirmed
CVE: CVE-2026-31870 (🔒)
GCVE (CVE): GCVE-0-2026-31870
GCVE (VulDB): GCVE-100-350495
EUVD: 🔒
Entry
Created: 03/11/2026 19:47Updated: 03/22/2026 18:37
Changes: 03/11/2026 19:47 (66), 03/11/2026 20:33 (1), 03/14/2026 17:01 (1), 03/22/2026 18:37 (2)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.