Medium severity · published Aug 27, 2026
CVE-2026-77341
cpp-httplib: CRLF injection via unvalidated HTTP trailer headers in chunked response writing
5.3
CVSS
0.5%
EPSS
No
On KEV
Description
cpp-httplib is a C++ header-only HTTP/HTTPS library. In version 0.49.0, the chunked-response trailer output path writes trailer header names and values directly to the socket without validating them, allowing CRLF sequences in a trailer field to inject additional headers or split the HTTP response. Unlike every other header-writing path in the library, the trailer-writing code applies none of the field-name and field-value checks that reject carriage return and line feed, so an application that places attacker-influenced data into a chunked response trailer emits attacker-controlled CRLF onto the wire. This enables HTTP response splitting, letting an attacker forge response headers or inject a second response. This issue is fixed in version 0.50.0.
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 40% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CP
cpp-httplib · yhirose
>= 0.49.0, < 0.50.0 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-77341
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-77341
github.com
https://github.com/yhirose/cpp-httplib/commit/568d434e72fc51729d0ad33abffb181e5f7a453d
github.com
https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-2r2h-jc8w-w66c
More from cpp-httplib
9.9
CVE-2026-45372
cpp-httplib: HTTP header value percent-decoding in server-side `parse_header` enables CRLF injection
9.8
CVE-2025-66570
cpp-httplib Untrusted HTTP Header Handling: Internal Header Shadowing (REMOTE*/LOCAL*)
8.8
CVE-2025-53628
cpp-httplib does not limit the length of a line
8.8
CVE-2023-26130
Versions of the package yhirose/cpp-httplib before 0.12.4 are vulnerable to CRLF Injection when untrusted user input is used to set the content-type header in the HTTP .Patch,…
8.2
CVE-2026-77358
cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()
