CVE-2026-33745

cpp-httplib Client Leaks Authentication Credentials to Untrusted Hosts on Cross-Origin HTTP Redirect

Published Mar 27, 2026 CVSS 3.1 · 7.4 High EPSS < 1% KEV · Not listed
Description
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.39.0, the cpp-httplib HTTP client forwards stored Basic Auth, Bearer Token, and Digest Auth credentials to arbitrary hosts when following cross-origin HTTP redirects (301/302/307/308). A malicious or compromised server can redirect the client to an attacker-controlled host, which then receives the plaintext credentials in the `Authorization` header. Version 0.39.0 fixes the issue.

Analysis

AI-generated

Technical impact

The vulnerability causes the cpp-httplib HTTP client to forward stored Basic Auth, Bearer Token, and Digest Auth credentials to any host encountered while following cross‑origin HTTP redirects (301/302/307/308). Consequently, an attacker can receive plaintext credentials in the Authorization header when the client redirects to a malicious domain. This constitutes a confidentiality breach, described by CWE‑200, and could allow an adversary to impersonate users or access protected resources.

Affected Systems

The affected product is yhirose:cpp-httplib, a C++11 header‑only HTTP/HTTPS library. Versions before 0.39.0 are vulnerable. Users running these older releases are subject to credential leakage when automatic redirect handling is enabled.

Risk and Exploitability

The vulnerability has a CVSS score of 7.4, indicating high severity. The EPSS score is less than 1%, suggesting low current exploit probability, and the issue is not listed in CISA’s KEV catalog. The likely attack vector involves an attacker controlling a server that issues a redirect to a malicious host, which captures the Authorization header sent by the client. If the client transmits credentials across the redirect, the attacker gains those credentials. Exploitation requires the client to follow the redirect automatically, which is the default behavior of the library.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to cpp-httplib version 0.39.0 or later, which removes the credential leakage flaw.

Generated by OpenCVE AI on April 2, 2026 at 04:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:a:yhirose:cpp-httplib:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, '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++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.39.0, the cpp-httplib HTTP client forwards stored Basic Auth, Bearer Token, and Digest Auth credentials to arbitrary hosts when following cross-origin HTTP redirects (301/302/307/308). A malicious or compromised server can redirect the client to an attacker-controlled host, which then receives the plaintext credentials in the `Authorization` header. Version 0.39.0 fixes the issue.
Title cpp-httplib Client Leaks Authentication Credentials to Untrusted Hosts on Cross-Origin HTTP Redirect
Weaknesses CWE-200
References
Metrics cvssV3_1

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

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 1, 2026, 3:55 AM
Reserved
Mar 23, 2026, 5:34 PM
Status
Analyzed
Published
Mar 27, 2026, 1:16 AM
Modified
Jun 17, 2026, 10:38 AM