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.
Published: 2026-08-27
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the process that writes chunked-response trailers in the cpp‑httplib library. The code writes the trailer field names and values directly to the socket without any validation of CRLF characters that normally must be rejected. If an attacker can influence the value of a trailer header, the library will send raw CRLF characters, enabling an attacker to split the HTTP response. This permits forging additional headers or creating a second, separate response, which can lead to cross-site scripting, cookie poisoning, or redirect attacks. The weakness aligns with CWE‑113 (HTTP Response Splitting) and CWE‑93 (Improper Handling of URL or Path Segments).

Affected Systems

The affected component is the header‑only C++ library yhirose:cpp‑httplib. The issue was present in version 0.49.0; it was fixed in version 0.50.0, which adds proper validation for trailer header names and values. All deployments using 0.49.0 that send chunked responses with trailer headers are vulnerable.

Risk and Exploitability

The CVSS base score is 5.3, indicating a medium severity. No EPSS score is available and the vulnerability is not listed in CISA's KEV catalog. Exploitation requires the attacker to supply data that becomes part of a chunked response trailer, which usually means the server application must reflect user input into such trailers. The lack of validation makes the exploit easier compared to libraries that enforce RFC compliance, but a successful exploit still requires client support for chunked transfer encoding. The overall risk is moderate, but due to the potential for severe downstream attacks, timely remediation is recommended.

Generated by OpenCVE AI on August 28, 2026 at 08:14 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade cpp‑httplib to version 0.50.0 or later.
  • Audit application code that populates trailer headers to ensure no attacker‑controlled data is included, and strip out any CRLF sequences from values.
  • Configure network security controls such as a WAF or HTTP proxy to detect and block responses containing unexpected CRLF sequences in trailer headers, to provide temporary protection until the library update is applied.

Generated by OpenCVE AI on August 28, 2026 at 08:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 28 Aug 2026 07:00:00 +0000

Type Values Removed Values Added
First Time appeared Yhirose
Yhirose cpp-httplib
Vendors & Products Yhirose
Yhirose cpp-httplib

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
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.
Title cpp-httplib: CRLF injection via unvalidated HTTP trailer headers in chunked response writing
Weaknesses CWE-113
CWE-93
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Yhirose Cpp-httplib
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-27T22:16:45.356Z

Reserved: 2026-08-20T19:28:35.243Z

Link: CVE-2026-77341

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-28T00:18:15.620

Modified: 2026-08-28T00:18:15.620

Link: CVE-2026-77341

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T08:15:06Z

Weaknesses
  • CWE-113

    Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')

  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')