CVE-2026-77341

cpp-httplib: CRLF injection via unvalidated HTTP trailer headers in chunked response writing

State
Published
Severity
5.3 Medium
Published
Aug 27, 2026
Updated
Aug 28, 2026
Reserved
Aug 20, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.05.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:NGitHub_M

Weaknesses

  • CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection')
  • CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')

Affected Products

ProductVersions
cpp-httplibyhirose
  • >= 0.49.0, < 0.50.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.