FKIE_CVE-2026-31870
Vulnerability from fkie_nvd - Published: 2026-03-11 18:16 - Updated: 2026-03-12 21:08
Severity ?
Summary
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.
References
Impacted products
| Vendor | Product | Version |
|---|
{
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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 \u2014 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."
},
{
"lang": "es",
"value": "cpp-httplib es una biblioteca HTTP/HTTPS multiplataforma de un solo archivo y solo de cabecera para C++11. Antes de la versi\u00f3n 0.37.1, cuando un cliente cpp-httplib utiliza la API de streaming (httplib::stream::Get, httplib::stream::Post, etc.), la biblioteca llama directamente a std::stoull() sobre el valor del encabezado Content-Length recibido del servidor sin validaci\u00f3n de entrada y sin manejo de excepciones. std::stoull lanza std::invalid_argument para cadenas no num\u00e9ricas y std::out_of_range para valores que exceden ULLONG_MAX. Dado que nada captura estas excepciones, el tiempo de ejecuci\u00f3n de C++ llama a std::terminate(), lo que termina el proceso con SIGABRT. Cualquier servidor al que se conecte el cliente \u2014incluidos los servidores alcanzados a trav\u00e9s de redirecciones HTTP, APIs de terceros o posiciones de man-in-the-middle\u2014 puede bloquear la aplicaci\u00f3n cliente con una \u00fanica respuesta HTTP. No se requiere autenticaci\u00f3n. No se requiere interacci\u00f3n del usuario final. El bloqueo es determinista e inmediato. Esta vulnerabilidad se corrige en la versi\u00f3n 0.37.1."
}
],
"id": "CVE-2026-31870",
"lastModified": "2026-03-12T21:08:22.643",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"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"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6,
"source": "security-advisories@github.com",
"type": "Secondary"
}
]
},
"published": "2026-03-11T18:16:26.487",
"references": [
{
"source": "security-advisories@github.com",
"url": "https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-39q5-hh6x-jpxx"
}
],
"sourceIdentifier": "security-advisories@github.com",
"vulnStatus": "Undergoing Analysis",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-248"
}
],
"source": "security-advisories@github.com",
"type": "Primary"
}
]
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…