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 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, SSLClient and Client in HTTPS mode skip certificate chain validation for IP-literal hosts with server certificate verification enabled. Additionally, WebSocketClient on the Mbed TLS backend skips verification altogether. This improper certificate validation (CWE-295) enables a man-in-the-middle attacker positioned to intercept traffic to present a crafted certificate, allowing them to read or modify the traffic. 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 enables man-in-the-middle attacks, compromising confidentiality and integrity of the communication by allowing the attacker to read or modify HTTPS traffic.
Mitigation Recommendations
A fixed version 0.47.0 of cpp-httplib is available that addresses this certificate validation issue. Users should upgrade to version 0.47.0 or later to remediate this vulnerability. Patch status is confirmed by the vendor's advisory indicating the fix in 0.47.0. No other mitigation is specified.
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 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, SSLClient and Client in HTTPS mode skip certificate chain validation for IP-literal hosts with server certificate verification enabled. Additionally, WebSocketClient on the Mbed TLS backend skips verification altogether. This improper certificate validation (CWE-295) enables a man-in-the-middle attacker positioned to intercept traffic to present a crafted certificate, allowing them to read or modify the traffic. 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 enables man-in-the-middle attacks, compromising confidentiality and integrity of the communication by allowing the attacker to read or modify HTTPS traffic.
Mitigation Recommendations
A fixed version 0.47.0 of cpp-httplib is available that addresses this certificate validation issue. Users should upgrade to version 0.47.0 or later to remediate this vulnerability. Patch status is confirmed by the vendor's advisory indicating the fix in 0.47.0. No other mitigation is specified.
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/18/2026, 15:20:13 UTC
Last updated: 08/23/2026, 22:52:12 UTC
Views: 64
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.