TLS client disables certificate verification when no CA is provided #118
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
When no CA path is provided via
--ca,SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL)disables all certificate verification (transport_tls.c:82). WhileX509_VERIFY_PARAM_set1_host()is called for SNI, withoutSSL_VERIFY_PEERthe certificate chain is never validated, so MITM attacks are trivial. There is no--insecureflag to explicitly opt into this.Location
src/shared/transport_tls.c:77-83
How to trigger
Connect to a TLS server without providing
--ca. The client will connect to any server presenting any certificate, including self-signed or fraudulent ones. A MITM attacker between client and server can intercept all data.Suggested Fix
SSL_CTX_set_default_verify_paths(ctx)--insecureflag (which currently does not exist)--cais provided, use it and enforceSSL_VERIFY_PEERSeverity
medium
Category
security
Sub-Agent
security-screener (SC-7)
This issue was automatically generated by the issue-creator agent.
Fixed in PR #148 — merged into main on 2026-07-29. See #148