cpp-httplib HTTP Header Value Percent-Decoding Vulnerability Enables CRLF Injection

Vulnerability

A vulnerability in cpp-httplib versions prior to 0.44.0 allows for CRLF injection through improper percent-decoding of HTTP header values. The library's server applies percent-decoding to most header values except for 'Location' and 'Referer'. This flaw enables encoded carriage return and line feed characters to be injected into headers, creating several potential attack vectors, such as HTTP response splitting and request smuggling.

Impact

Exploitation of this vulnerability leads to HTTP response splitting, allowing injection of additional response headers or manipulation of the response body. It also facilitates HTTP request smuggling when the cpp-httplib client is used as a forward proxy, by injecting CRLF into headers that are proxied to the server.

Reproduction

To reproduce this vulnerability, set up a cpp-httplib server and send a request with a header value that includes percent-encoded CRLF characters. The server will decode the header value and inject the CRLF into the response, demonstrating the injection flaw.

Remediation

Users are advised to update to cpp-httplib version 0.44.0 or later, where this vulnerability has been fixed.

Added: May 29, 2026, 8:30 PM
Updated: May 29, 2026, 8:30 PM

Vulnerability Rating

Custom Algorithm
spread
6.2
impact
0.6
exploitability
9.5
remediation
7.7
relevance
9.6
threat
6.4
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.