You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have discovered a critical security vulnerability in the HTTP client implementation of this library. The issue lies in the SSL verification process, where SSL certificate verification is disabled, allowing for potential Man-in-the-Middle (MITM) attacks.
Affected Code:
The most critical part of the code is located in BoostHttpOnlySslClient.cpp at line 43:
The HTTP client should verify the SSL certificate and fail the request if the certificate is invalid or not trusted. The client should not connect to the proxy when the SSL certificate verification fails.
Actual Behavior:
The HTTP client connects to the proxy server and accepts the invalid self-signed certificate, demonstrating that SSL certificate verification is not enforced, making it vulnerable to MITM attacks.
Suggested Fix:
To mitigate MITM vulnerabilities, enable SSL certificate verification in the HTTP client library. This can be easily achieved in a cross-platform manner by using the boost-certify library, which simplifies SSL certificate verification with Boost.Beast and Boost.Asio.
Description:
We have discovered a critical security vulnerability in the HTTP client implementation of this library. The issue lies in the SSL verification process, where SSL certificate verification is disabled, allowing for potential Man-in-the-Middle (MITM) attacks.
Affected Code:
The most critical part of the code is located in BoostHttpOnlySslClient.cpp at line 43:
https://github.com/reo7sp/tgbot-cpp/blob/master/src/net/BoostHttpOnlySslClient.cpp#L43
Issue:
The code sets the SSL verification mode to
ssl::verify_none
, effectively bypassing any SSL certificate verification.Steps to Reproduce:
Expected Behavior:
The HTTP client should verify the SSL certificate and fail the request if the certificate is invalid or not trusted. The client should not connect to the proxy when the SSL certificate verification fails.
Actual Behavior:
The HTTP client connects to the proxy server and accepts the invalid self-signed certificate, demonstrating that SSL certificate verification is not enforced, making it vulnerable to MITM attacks.
Suggested Fix:
To mitigate MITM vulnerabilities, enable SSL certificate verification in the HTTP client library. This can be easily achieved in a cross-platform manner by using the boost-certify library, which simplifies SSL certificate verification with Boost.Beast and Boost.Asio.
Reference:
https://github.com/djarek/certify
The text was updated successfully, but these errors were encountered: