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

Machine-generated threat intelligence

AILast updated: 03/20/2026, 23:28:24 UTC

Technical Analysis

cpp-httplib is a widely used single-header C++11 library facilitating HTTP and HTTPS client-server communication. In versions before 0.37.2, a critical flaw exists when the client is configured with a proxy and the option set_follow_location(true) is enabled. Under these conditions, if the server issues an HTTPS redirect, the library disables TLS certificate and hostname verification on the new redirected connection without notifying the application. This means the client will accept any TLS certificate presented by the redirect target, including expired, self-signed, or maliciously forged certificates. The root cause is improper certificate validation (CWE-295) during HTTPS redirects in proxied connections. An attacker positioned on the network path can exploit this by injecting a redirect response to a malicious HTTPS endpoint with an invalid certificate, thereby intercepting and decrypting all traffic on the redirected connection. This includes sensitive data such as credentials, session tokens, and other confidential information. The vulnerability does not require user interaction or authentication but does require the attacker to be able to manipulate network traffic (man-in-the-middle). The issue is resolved in cpp-httplib version 0.37.2, where proper certificate validation is enforced on redirected HTTPS connections even when a proxy is used.

Potential Impact

This vulnerability severely compromises the confidentiality and integrity of HTTPS communications made using vulnerable cpp-httplib clients configured with proxies and automatic redirect following. Attackers with network access can perform man-in-the-middle attacks by injecting malicious redirects and presenting invalid TLS certificates that the client will accept without error. This enables interception and potential modification of sensitive data such as authentication credentials, session cookies, and other private information transmitted over HTTPS. Organizations relying on cpp-httplib in proxy environments, especially in internal networks or cloud infrastructures where proxies are common, face risks of credential theft, session hijacking, and data leakage. The vulnerability undermines the fundamental trust model of TLS, potentially exposing critical systems and user data to attackers. Although exploitation requires network-level access, the widespread use of proxies and automatic redirect following in HTTP clients increases the attack surface. The flaw does not affect availability but has high impact on confidentiality and integrity.

Mitigation Recommendations

Immediate mitigation requires upgrading cpp-httplib to version 0.37.2 or later where the certificate validation bug is fixed. Until upgrade is possible, organizations should disable automatic redirect following (set_follow_location(false)) when using proxies to prevent the vulnerable code path. Network defenses such as strict proxy controls, TLS interception detection, and network segmentation can reduce exposure to man-in-the-middle attackers. Application developers should audit their use of cpp-httplib to confirm proxy and redirect configurations and ensure TLS verification is enforced. Employing additional TLS validation layers or certificate pinning at the application level can provide defense in depth. Monitoring network traffic for unexpected redirects and anomalous TLS certificates can help detect exploitation attempts. Finally, educating developers and security teams about this specific vulnerability and its conditions is critical to prevent misconfiguration and exploitation.

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/20/2026, 11:28:24 PM

Last updated: 4/28/2026, 8:14:10 PM

Views: 117

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 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