CVE-2026-54919 Details
Description
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. In affected Mbed TLS backend versions from 0.31.0 through 0.46.1 and wolfSSL backend versions from 0.33.0 through 0.46.1, when cpp-httplib is built with CPPHTTPLIB_MBEDTLS_SUPPORT or CPPHTTPLIB_WOLFSSL_SUPPORT and a client connects to an IP-literal host with server certificate verification enabled, SSLClient and Client in HTTPS mode skip certificate chain validation and WebSocketClient on the Mbed TLS backend skips verification altogether, allowing a man-in-the-middle attacker positioned to intercept traffic to present a crafted certificate and read or modify the traffic. This issue is fixed in version 0.47.0.
A vulnerability exists in cpp-httplib, a cross-platform HTTP/HTTPS library for C++11, specifically in versions 0.31.0 prior to 0.47.0. When built with Mbed TLS or wolfSSL support, the library fails to properly validate SSL certificates for IP-literal hosts when server certificate verification is enabled. This oversight allows a man-in-the-middle attacker to intercept and manipulate traffic by presenting a fraudulent certificate. The issue arises because the Mbed TLS and wolfSSL backends disable proper certificate chain validation for IP addresses during the handshake, leaving only a post-handshake identity check, which can be easily exploited.
Users can upgrade to cpp-httplib version 0.47.0 or later, where this vulnerability has been fixed. If an upgrade is not possible, the OpenSSL backend can be used instead, or connections can be made using a DNS hostname rather than an IP literal. If a fixed IP address must be used, the 'set_hostname_addr_map()' function can be employed to associate the hostname with the IP address while maintaining full certificate verification.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/yhirose/cpp-httplib/commit/fa981cedae004ea9d946f1392b9dec22fac6fee6 | [email protected] | Patch |
| https://github.com/yhirose/cpp-httplib/releases/tag/v0.47.0 | [email protected] | ProductRelease Notes |
| https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-8ffh-4p95-g3p2 | [email protected] | MitigationPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-295 | Improper Certificate Validation | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| yhirose cpp-httplib | >= 0.31.0, < 0.47.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 14, 2026 | CVE Modified | CISA-ADP |
| Jul 14, 2026 | Initial Analysis | [email protected] |
| Jul 10, 2026 | New CVE Received | [email protected] |
| Jul 10, 2026 | CVE Modified | CISA-ADP |