Yhirose cpp-httplib
cpp-httplib: TLS certificate chain verification bypassed for IP-literal hosts on Mbed TLS and wolfSSL backends
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.31.0, < 0.47.0
Fixed in 0.47.0
Mitigation
Upgrade cpp-httplib to 0.47.0 or later.
References
- Vendor advisory github.com/yhirose/cpp-httplib/security/adviso…
- Patch github.com/yhirose/cpp-httplib/commit/fa981ced…
- Release notes github.com/yhirose/cpp-httplib/releases/tag/v0…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.