Input validation error in Cpp-httplib - CVE-2026-31870
Published: April 24, 2026
Vulnerability details
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.
Affected software
openEuler
cpp-httplib
cpp-httplib-debuginfo
cpp-httplib-debugsource
cpp-httplib-devel
How to mitigate CVE-2026-31870
cpp-httplib - update to 0.38.0-1
cpp-httplib-debuginfo - update to 0.38.0-1
cpp-httplib-debugsource - update to 0.38.0-1
cpp-httplib-devel - update to 0.38.0-1