An SSLv3 minimum-version setting

An SSLv3 minimum-version setting

Description

Current Go crypto/tls does not support SSLv3. A minimum of tls.VersionSSL30 can still allow legacy versions that the runtime supports, such as TLS 1.0 or 1.1.

Potential impact

A connection can negotiate a version outside your policy. Older systems that actually negotiate SSLv3 are also exposed to weaknesses such as POODLE.

Remediation

Set tls.Config.MinVersion to at least tls.VersionTLS12, or tls.VersionTLS13 if both sides support it. Use a maintained Go release, check the versions permitted by clients and servers, and verify the negotiated version in deployment.

Examples

Before

go
package main

import (
    "crypto/tls"
    "net/http"
)

func newInsecureClient() *http.Client {
    // Discouraged: set the SSLv3 constant as the minimum
    tlsConfig := &tls.Config{
        MinVersion: tls.VersionSSL30, // Current Go does not support SSLv3
    }

    return &http.Client{
        Transport: &http.Transport{
            TLSClientConfig: tlsConfig,
        },
    }
}

func main() {
    client := newInsecureClient()
    // Negotiation uses TLS versions supported by the runtime
    _, _ = client.Get("https://example.com")
}

After

go
package main

import (
    "crypto/tls"
    "net/http"
)

func newSecureClient() *http.Client {
    // Require at least TLS 1.2, or TLS 1.3 where compatible
    tlsConfig := &tls.Config{
        MinVersion: tls.VersionTLS12, // Or tls.VersionTLS13
    }

    return &http.Client{
        Transport: &http.Transport{
            TLSClientConfig: tlsConfig,
        },
    }
}

func main() {
    client := newSecureClient()
    // Use the configured TLS minimum
    _, _ = client.Get("https://example.com")
}

The HTTP client in the example excludes TLS 1.0 and 1.1. Check certificate validation and cipher suites separately.

References