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.
Metrics
CVSS 3.1 7.4/10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NWeakness enumeration
Affected software
| Vendor | Product | Versions |
|---|---|---|
| yhirose | cpp-httplib | < 0.39.0 |
References
- https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-6hrp-7fq9-3qv2Exploit, Mitigation, Vendor Advisory
Timeline
- Published
- Mar 27, 2026
- Last modified
- Jun 17, 2026
- NVD status
- Analyzed