Input validation error in Cpp-httplib - CVE-2026-31870

 

Input validation error in Cpp-httplib - CVE-2026-31870

Published: April 24, 2026


Vulnerability identifier: #VU127463
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-31870
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Cpp-httplib Project
Affected software:
Cpp-httplib

Detailed vulnerability description

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to improper input validation in ClientImpl::open_stream() when parsing the Content-Length response header in the streaming API. A remote attacker can send a specially crafted HTTP response with a malformed Content-Length header to cause a denial of service.

Only the streaming API paths that call open_stream() are affected; the regular non-streaming request path is not affected.


How to mitigate CVE-2026-31870

Install security update from vendor's website.

Sources