CVE-2026-102944: cpp-httplib: Cookie header leaked on cross-origin redirect

Published Oct 14, 2026
·
Updated

cpp-httplib is a C++ header-only HTTP/HTTPS library. Prior to 0.51.0, createredirectclient() 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 defaultheaders 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.

Affected Software

1 affected component
cpp-httplib cpp-httplib<0.51.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade cpp-httplib to a version that resolves this vulnerability.

    Fixed in 0.51.0

Event History

Oct 14, 2026
CVE Published
via MITRE·06:18 PM
Data Sourced
via MITRE·06:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to cookie leakage?

Applications using cpp-httplib before 0.51.0 are exposed when they send Cookie headers and follow a cross-origin 301, 302, 307, or 308 redirect. Cookies supplied directly on a request or through default_headers_ can be forwarded to the redirect target.

2

What must an attacker be able to do to obtain cookies?

An attacker must be able to control a redirect response that sends the client to a different origin. For requests to a non-HTTPS origin, an attacker in a network position can also potentially obtain the cookies.

3

Are all redirect responses affected?

No. The issue affects cross-origin 301, 302, 307, and 308 redirects; the 303 redirect path clears all request headers and is not affected.

4

What can be done if upgrading is not immediately possible?

Avoid following cross-origin 301, 302, 307, and 308 redirects on requests that include Cookie headers. In particular, do not place sensitive cookies in request headers or default_headers_ where such redirects may be followed.

5

How can I determine whether my use is affected?

Check whether the application uses a cpp-httplib version earlier than 0.51.0, sends Cookie headers directly or through default_headers_, and follows cross-origin redirects. Requests redirected with status 301, 302, 307, or 308 are the relevant cases.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203