CVE-2026-102944

cpp-httplib: Cookie header leaked on cross-origin redirect

Published Oct 14, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

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 available
History
Type Values Removed Values Added
First Time appeared Yhirose
Yhirose cpp-httplib
Vendors & Products Yhirose
Yhirose cpp-httplib
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 15, 2026, 2:48 PM
Reserved
Sep 29, 2026, 8:24 PM
Status
Deferred
Published
Oct 14, 2026, 7:17 PM
Modified
Oct 16, 2026, 8:04 PM