CVE-2026-103930

cpp-httplib open_stream serializes CRLF in request target into HTTP request line

Published Oct 14, 2026 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
Description
cpp-httplib is a C++ header-only HTTP/HTTPS library. From 0.29.0 until 0.51.0, Client::open_stream in httplib.h accepts a caller-controlled path that reaches detail::write_request_line() without the detail::encode_path() protection used by the ordinary buffered request path. Raw carriage-return and line-feed bytes in the path can therefore split the outbound HTTP/1.1 request line and inject attacker-shaped request metadata. Exploitation requires an embedding application to pass remote user input into the open_stream path and a backend or intermediary that interprets the injected bytes; the established impact is modification of backend-visible request data, not direct confidentiality or availability impact. This issue is fixed in version 0.51.0.

Analysis

AI-generated

Technical impact

The flaw arises because the Client::open_stream function in cpp‑httplib accepts a caller‑controlled path without applying the usual URL encoding step. Raw carriage‑return and line‑feed bytes in the path are serialized unchanged into the HTTP/1.1 request line, which can split the line and inject attacker‑crafted request metadata. This can cause the downstream server or intermediary to receive a modified request that was not intended by the application. The vulnerability is categorized as a request smuggling / tampering weakness (CWE‑113) and does not provide direct confidentiality or availability impact.

Affected Systems

Applications built with yhirose's cpp‑httplib 0.29.0 through 0.50.x that invoke Client::open_stream with user‑supplied paths are affected. The issue is resolved in version 0.51.0; consequently any use of an older version exposes the impacted code path.

Risk and Exploitability

The CVSS score of 3.7 indicates low severity, and EPSS data is currently unavailable, meaning no quantified exploitation probability is reported. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires the embedding application to forward remote input into open_stream and a backend that interprets the injected CRLF bytes. Because the impact is limited to request data manipulation rather than direct compromise of the host, the overall risk is moderate, but the potential for altering request behavior warrants prompt mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade cpp‑httplib to version 0.51.0 or later.
  • Validate or encode any paths before invoking Client::open_stream to ensure no CRLF bytes are present.
  • Sanitize or reject external input that may contain control characters before it reaches the open_stream call.

Generated by OpenCVE AI on October 15, 2026 at 13:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Yhirose
Yhirose cpp-httplib
Vendors & Products Yhirose
Yhirose cpp-httplib
Type Values Removed Values Added
Description cpp-httplib is a C++ header-only HTTP/HTTPS library. From 0.29.0 until 0.51.0, Client::open_stream in httplib.h accepts a caller-controlled path that reaches detail::write_request_line() without the detail::encode_path() protection used by the ordinary buffered request path. Raw carriage-return and line-feed bytes in the path can therefore split the outbound HTTP/1.1 request line and inject attacker-shaped request metadata. Exploitation requires an embedding application to pass remote user input into the open_stream path and a backend or intermediary that interprets the injected bytes; the established impact is modification of backend-visible request data, not direct confidentiality or availability impact. This issue is fixed in version 0.51.0.
Title cpp-httplib open_stream serializes CRLF in request target into HTTP request line
Weaknesses CWE-113
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N'}

Weaknesses
  • CWE-113

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 15, 2026, 3:06 PM
Reserved
Oct 1, 2026, 2:20 PM
Status
Deferred
Published
Oct 14, 2026, 7:17 PM
Modified
Oct 16, 2026, 8:04 PM