7.4high
cpp-httplib: TLS certificate chain verification bypassed for IP-literal hosts on Mbed TLS and wolfSSL backends
- Severity
- 7.4high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.26% (higher than 11% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| yhirose cpp-httplib | >= 0.31.0, < 0.47.0, from 0.31.0 before 0.47.0 | CVE List, NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
cpp-httplib es una biblioteca HTTP/HTTPS multiplataforma de un solo archivo de cabecera para C++11. En las versiones afectadas del backend Mbed TLS desde la 0.31.0 hasta la 0.46.1 y las versiones del backend wolfSSL desde la 0.33.0 hasta la 0.46.1, cuando cpp-httplib se compila con CPPHTTPLIB_MBEDTLS_SUPPORT o CPPHTTPLIB_WOLFSSL_SUPPORT y un cliente se conecta a un host IP-literal con la verificación del certificado del servidor habilitada, SSLClient y Client en modo HTTPS omiten la validación de la cadena de certificados y WebSocketClient en el backend Mbed TLS omite la verificación por completo, permitiendo que un atacante man-in-the-middle posicionado para interceptar el tráfico presente un certificado manipulado y lea o modifique el tráfico. Este problema se corrige en la versión 0.47.0.
References
| https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-8ffh-4p95-g3p2 | mitigation, patch, vendor-advisory | |
| https://github.com/yhirose/cpp-httplib/commit/fa981cedae004ea9d946f1392b9dec22fac6fee6 | patch | |
| https://github.com/yhirose/cpp-httplib/releases/tag/v0.47.0 | product, release-notes | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54919 changed 2026-07-14 | CVE Terms of Use |
| NVD | CVE-2026-54919 changed 2026-10-25 | Public domain |