Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V5911. OWASP. Insecure TLS...
menu mobile close menu
Analyzing projects
Additional information
toggle menu Contents

V5911. OWASP. Insecure TLS configuration can lead to improper certificate validation, making the connection vulnerable.

Nov 26 2026

The analyzer has detected an improper certificate validation during the establishment of a TLS connection.

In this case, the application cannot verify that it is communicating with the specific node it is connecting to. An attacker who gains access to the network path between the client and the server can impersonate a trusted node and carry out a man-in-the-middle (MITM) attack.

The connection remains encrypted, but the attacker decrypts it on their own end: they can read confidential data and also tamper with requests and responses.

Vulnerabilities related to improper certificate validation fall under A07:2025 Authentication Failures in the OWASP Top 10 Application Security Risks 2025.

The example N1:

func FetchReport(w http.ResponseWriter, r *http.Request) {
  client := &http.Client{
    Transport: &http.Transport{
      TLSClientConfig: &tls.Config{
        InsecureSkipVerify: true,
      },
    },
  }
  resp, err := client.Get("https://reports.example.com/daily")
  ....
}

Setting the InsecureSkipVerify field to true turns off server certificate verification entirely. The client will accept any certificate: expired, untrusted, or issued for a different domain name.

If the server uses a publicly trusted certificate, simply remove the InsecureSkipVerify field, since verification is enabled by default. If the certificate was issued by a private certificate authority, add that authority's root certificate to the client's trust store through the RootCAs field:

func FetchReport(w http.ResponseWriter, r *http.Request) {
  caCert, err := os.ReadFile("/etc/ssl/certs/internal-ca.pem")
  ....
  roots := x509.NewCertPool()
  roots.AppendCertsFromPEM(caCert)
  client := &http.Client{
    Transport: &http.Transport{
      TLSClientConfig: &tls.Config{
        RootCAs: roots,
      },
    },
  }
  resp, err := client.Get("https://reports.example.com/daily")
  ....
}

The example N2:

client := &http.Client{
  Transport: &http.Transport{
    TLSClientConfig: &tls.Config{
      MinVersion: tls.VersionTLS10,
    },
  },
}

It allows outdated versions of the TLS 1.0 and TLS 1.1 protocols, which have known vulnerabilities and rely on weak cryptographic algorithms. If the client permits their use, a connection to the server may be established using an outdated protocol version, and an attacker could exploit its weaknesses.

The minimum protocol version should be set to TLS 1.2 or higher:

client := &http.Client{
  Transport: &http.Transport{
    TLSClientConfig: &tls.Config{
      MinVersion: tls.VersionTLS12,
    },
  },
}

You can find more security recommendations on the OWASP Cheat Sheet Series pages, such as:

This diagnostic rule is classified as: