Input validation error in Cpp-httplib - CVE-2026-31870
Published: April 24, 2026
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.