yhirose cpp-httplib
cpe:2.3:a:cpp-httplib_project:cpp-httplib:*:*:*:*:*:*:*
- <= 0.38.0
A vulnerability in cpp-httplib versions prior to 0.39.0 allows the HTTP client to unintentionally forward stored authentication credentials, including Basic Auth, Bearer Tokens, and Digest Auth, to arbitrary hosts during cross-origin HTTP redirects. This occurs because the client re-attaches these credentials after stripping the Authorization header, resulting in a leak to potentially malicious servers. Additionally, the library lacks proper protection against downgrading HTTPS connections to HTTP, further exposing credentials.
Exploitation of this vulnerability leads to unauthorized interception of authentication credentials by an attacker-controlled server, with potential exposure of these credentials over unencrypted HTTP.
The vulnerability can be reproduced by configuring a cpp-httplib client to follow redirects while using any of the supported authentication methods. When the client is redirected to an attacker-controlled host, the Authorization header is leaked, revealing the stored credentials.
Users are advised to update to cpp-httplib version 0.39.0 or later, and to be cautious of HTTPS-to-HTTP downgrades that could expose credentials.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.