Description
cpp-httplib is a C++ header-only HTTP/HTTPS library. Prior to 0.51.0, create_redirect_client() removes Host, Proxy-Authorization, and Authorization headers when following a cross-origin 301, 302, 307, or 308 redirect but leaves Cookie headers attached. detail::redirect() copies the request for those redirect codes, so cookies supplied directly or through default_headers_ are sent to the redirect target. An attacker who controls a redirect response, or a network position for a non-HTTPS origin, can receive session cookies intended for the original origin. A 303 redirect is not affected because that path clears all request headers. This issue is fixed in version 0.51.0.
Published: 2026-10-14
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Unauthorized access via session hijacking
Action: Update library
AI Analysis

Impact

cpp-httplib is a header‑only C++ HTTP/HTTPS library whose cross‑origin redirect handling mistakenly preserves Cookie headers, whereas other sensitive headers are removed. This leaves authenticated session cookies exposed to the redirect target. The weakness is a basic information‑exposure flaw (CWE‑522) that can enable an attacker to obtain a victim’s session credentials and potentially impersonate them, compromising confidentiality and integrity of user accounts.

Affected Systems

The vulnerability affects any project that incorporates yhirose:cpp‑httplib version 0.50.x or earlier. Both the 301, 302, 307, and 308 redirect codes are impacted; 303 redirects are unaffected. This issue is fixed in 0.51.0; versions prior to that, especially those used in open‑source projects or embedded systems, remain vulnerable.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity. The EPSS score indicates a very low likelihood of exploitation (< 1%), and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is through a controlled redirect response or a network position where an attacker can intercept HTTP traffic; a malicious redirect source can cause the client to send the victim’s cookies to an attacker‑controlled domain.

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

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade cpp-httplib to version 0.51.0 or later, which removes the Cookie header from cross‑origin redirects.
  • If upgrading is not immediately possible, configure the client or add custom logic to strip Cookie headers before following any cross‑origin redirect.
  • Use a reverse proxy or firewall rule to detect and block cross‑origin redirects that forward Cookie headers, ensuring no session cookies are sent to unintended domains.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 00:45:00 +0000

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

Thu, 15 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 14 Oct 2026 18:45:00 +0000

Type Values Removed Values Added
Description cpp-httplib is a C++ header-only HTTP/HTTPS library. Prior to 0.51.0, create_redirect_client() removes Host, Proxy-Authorization, and Authorization headers when following a cross-origin 301, 302, 307, or 308 redirect but leaves Cookie headers attached. detail::redirect() copies the request for those redirect codes, so cookies supplied directly or through default_headers_ are sent to the redirect target. An attacker who controls a redirect response, or a network position for a non-HTTPS origin, can receive session cookies intended for the original origin. A 303 redirect is not affected because that path clears all request headers. This issue is fixed in version 0.51.0.
Title cpp-httplib: Cookie header leaked on cross-origin redirect
Weaknesses CWE-522
References
Metrics cvssV3_1

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


Subscriptions

Yhirose Cpp-httplib
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-15T14:48:03.087Z

Reserved: 2026-09-29T20:24:43.341Z

Link: CVE-2026-102944

cve-icon Vulnrichment

Updated: 2026-10-15T14:43:30.596Z

cve-icon NVD

Status : Deferred

Published: 2026-10-14T19:17:06.347

Modified: 2026-10-16T20:04:29.760

Link: CVE-2026-102944

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T22:45:13Z

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials