Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-32627: CWE-295: Improper Certificate Validation in yhirose cpp-httplib

0
High
VulnerabilityCVE-2026-32627cvecve-2026-32627cwe-295
Published: Fri Mar 13 2026 (03/13/2026, 20:48:14 UTC)
Source: CVE Database V5
Vendor/Project: yhirose
Product: cpp-httplib

Description

cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.37.2, when a cpp-httplib client is configured with a proxy and set_follow_location(true), any HTTPS redirect it follows will have TLS certificate and hostname verification silently disabled on the new connection. The client will accept any certificate presented by the redirect target — expired, self-signed, or forged — without raising an error or notifying the application. A network attacker in a position to return a redirect response can fully intercept the follow-up HTTPS connection, including any credentials or session tokens in flight. This vulnerability is fixed in 0.37.2.

AI-Powered Analysis

AILast updated: 03/13/2026, 21:15:44 UTC

Technical Analysis

The cpp-httplib library is a widely used, single-header C++11 library for HTTP and HTTPS client-server communication. In versions before 0.37.2, a critical flaw exists when the client is configured to use a proxy and enabled to follow HTTP redirects (set_follow_location(true)). Specifically, if the client receives an HTTPS redirect response, it disables TLS certificate and hostname verification on the subsequent redirected connection. This means the client will accept any TLS certificate presented by the redirect target without validation, including expired, self-signed, or maliciously forged certificates. This improper certificate validation (CWE-295) effectively allows a man-in-the-middle (MITM) attacker who can inject or manipulate redirect responses to intercept and decrypt the redirected HTTPS traffic. Such interception can expose sensitive information like credentials, session tokens, and other confidential data transmitted over the connection. The vulnerability is particularly dangerous because it occurs silently without alerting the application or user, undermining the fundamental trust model of TLS. The issue is fixed in cpp-httplib version 0.37.2 by restoring proper certificate and hostname verification on redirected HTTPS connections. The CVSS 3.1 score of 8.7 reflects the high confidentiality and integrity impact, network attack vector, no privileges or user interaction required, and the scope change due to redirect handling. No known exploits have been reported in the wild yet.

Potential Impact

Organizations using vulnerable versions of cpp-httplib in their software, especially those relying on proxy configurations and automatic redirect following, face significant risks. An attacker positioned on the network path—such as on compromised Wi-Fi networks, ISP-level attackers, or malicious proxies—can exploit this flaw to intercept and manipulate HTTPS traffic that should be secure. This can lead to credential theft, session hijacking, data leakage, and unauthorized access to protected resources. The silent failure of certificate validation increases the likelihood that such attacks go undetected. The vulnerability undermines the security guarantees of TLS, potentially affecting any application built on cpp-httplib that handles sensitive data or authentication tokens. Given the library’s cross-platform nature and use in embedded systems, IoT devices, and custom applications, the scope of impact can be broad. Although no exploits are known in the wild yet, the ease of exploitation and high impact make timely patching critical to prevent compromise.

Mitigation Recommendations

The primary mitigation is to upgrade all affected cpp-httplib instances to version 0.37.2 or later, where the certificate validation issue on HTTPS redirects is fixed. For organizations unable to immediately upgrade, a temporary workaround is to disable automatic redirect following (set_follow_location(false)) when using proxies, thereby preventing the vulnerable code path from executing. Additionally, network-level protections such as enforcing strict TLS inspection policies, using secure proxy configurations that validate certificates, and employing network segmentation to limit exposure to untrusted networks can reduce risk. Application developers should also implement additional certificate pinning or validation layers where feasible to detect anomalies. Monitoring network traffic for unexpected redirects and anomalous TLS certificates can help detect exploitation attempts. Finally, educating developers and security teams about the risks of improper certificate validation and ensuring secure coding practices in HTTP client implementations is essential.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-12T15:29:36.558Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69b47ac82f860ef943b21729

Added to database: 3/13/2026, 8:59:52 PM

Last enriched: 3/13/2026, 9:15:44 PM

Last updated: 3/15/2026, 6:45:42 PM

Views: 17

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses