yhirose cpp-httplib up to 0.37.0 Streaming API std::stoull Content-Length uncaught exception

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.3$0-$5k0.00

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Vendor

Name

Version

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.4
VulDB 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): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Uncaught exception
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 303248
Nessus Name: Fedora 42 : cpp-httplib (2026-6ed9c65eaf)

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: cpp-httplib 0.37.1

Timelineinfo

03/09/2026 CVE reserved
03/11/2026 +2 days Advisory disclosed
03/11/2026 +0 days VulDB entry created
03/22/2026 +11 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: GHSA-39q5-hh6x-jpxx
Status: Confirmed

CVE: CVE-2026-31870 (🔒)
GCVE (CVE): GCVE-0-2026-31870
GCVE (VulDB): GCVE-100-350495
EUVD: 🔒

Entryinfo

Created: 03/11/2026 19:47
Updated: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you know our Splunk app?

Download it now for free!