CVE-2026-45372

yhirose · cpp-httplib

cpp-httplib is vulnerable to header injection because it performs validity checks before percent-decoding, allowing attackers to inject CRLF sequences into HTTP headers.

Executive summary

A header injection vulnerability in the cpp-httplib library allows unauthenticated attackers to inject malicious characters, potentially leading to HTTP request smuggling or response splitting.

Vulnerability

This flaw occurs because the server performs validity checks on header values prior to percent-decoding. An unauthenticated attacker can supply encoded carriage return and newline characters (%0D%0A) that bypass these checks and are subsequently expanded into literal \r\n byte pairs, facilitating header injection.

Business impact

This vulnerability carries a CVSS score of 9.9, reflecting its critical potential for system-wide impact. Successful exploitation can lead to HTTP request smuggling or response splitting, which may allow attackers to poison web caches, hijack sessions, or bypass security controls, ultimately resulting in unauthorized data access or complete service disruption.

Remediation

Immediate Action: Update the cpp-httplib library to version 0.44.0 or later immediately to ensure proper header validation.

Proactive Monitoring: Review web server and application logs for suspicious characters (such as %0D, %0A, or \r\n) within incoming HTTP header fields.

Compensating Controls: Deploy a Web Application Firewall (WAF) configured to inspect and sanitize HTTP headers for CRLF injection patterns to provide a virtual patch while the update is being staged.

Exploitation status

Public Exploit Available: false

Analyst recommendation

The severity of this flaw necessitates immediate attention. Organizations utilizing cpp-httplib must prioritize upgrading to version 0.44.0 to mitigate the risk of header-based attacks that could compromise the integrity of the entire web application stack.