CVE-2026-54919: CWE-295: Improper Certificate Validation in yhirose cpp-httplib
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.
AI Analysis
Technical Summary
cpp-httplib is a C++11 single-file header-only HTTP/HTTPS library. In affected versions from 0.31.0 through 0.46.1, when built with CPPHTTPLIB_MBEDTLS_SUPPORT or CPPHTTPLIB_WOLFSSL_SUPPORT, the library improperly validates server certificates for IP-literal hosts. Specifically, SSLClient and Client in HTTPS mode skip certificate chain validation, and WebSocketClient on the Mbed TLS backend skips verification altogether. This vulnerability (CWE-295) enables a man-in-the-middle attacker to intercept and manipulate traffic by presenting a crafted certificate. The vulnerability is resolved in version 0.47.0.
Potential Impact
An attacker capable of intercepting network traffic to an affected client can exploit this vulnerability to bypass SSL/TLS certificate validation. This allows the attacker to present a fraudulent certificate, leading to potential disclosure and modification of sensitive data transmitted over HTTPS or WebSocket connections. The vulnerability compromises confidentiality and integrity of communications but does not affect availability.
Mitigation Recommendations
A fixed version 0.47.0 of cpp-httplib is available that addresses this improper certificate validation issue. Users should upgrade to version 0.47.0 or later to remediate this vulnerability. No other mitigation or temporary workaround is indicated in the available data.
CVE-2026-54919: CWE-295: Improper Certificate Validation in yhirose cpp-httplib
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.
CVSS v3.1
Score 7.4high
Affected software
pkg:github/yhirose/cpp-httplibRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
cpp-httplib is a C++11 single-file header-only HTTP/HTTPS library. In affected versions from 0.31.0 through 0.46.1, when built with CPPHTTPLIB_MBEDTLS_SUPPORT or CPPHTTPLIB_WOLFSSL_SUPPORT, the library improperly validates server certificates for IP-literal hosts. Specifically, SSLClient and Client in HTTPS mode skip certificate chain validation, and WebSocketClient on the Mbed TLS backend skips verification altogether. This vulnerability (CWE-295) enables a man-in-the-middle attacker to intercept and manipulate traffic by presenting a crafted certificate. The vulnerability is resolved in version 0.47.0.
Potential Impact
An attacker capable of intercepting network traffic to an affected client can exploit this vulnerability to bypass SSL/TLS certificate validation. This allows the attacker to present a fraudulent certificate, leading to potential disclosure and modification of sensitive data transmitted over HTTPS or WebSocket connections. The vulnerability compromises confidentiality and integrity of communications but does not affect availability.
Mitigation Recommendations
A fixed version 0.47.0 of cpp-httplib is available that addresses this improper certificate validation issue. Users should upgrade to version 0.47.0 or later to remediate this vulnerability. No other mitigation or temporary workaround is indicated in the available data.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-16T13:49:33.557Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a511ed468715ace43d6896c
Added to database: 07/10/2026, 16:33:24 UTC
Last enriched: 07/10/2026, 16:47:58 UTC
Last updated: 07/10/2026, 17:18:19 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.