Skip to content

SSL Verification Disabled

What does this mean ?

verify_mode is set to SSL_VERIFY_NONE which's means the SSL verfication can be bypassed

What can happen ?

Attackers can bypass authentication and have unauthorized access to the application/system

Recommendation

It's highly recommended to enable SSL verification and never set it to SSL_VERIFY_NONE

Sample Code

Vulnerable :

sslContext.SetVerify(VerifyMode.SSL_VERIFY_NONE, null);

Non Vulnerable :

sslContext.SetVerify(VerifyMode.SSL_VERIFY_PEER, remoteCertificateSelectionCallback);

Vulnerable :

SSLContext.setVerify(ctx, SSL.SSL_VERIFY_NONE, VERIFY_DEPTH);

Non Vulnerable :

SSLContext.setVerify(ctx, SSL.SSL_VERIFY_PEER, VERIFY_DEPTH);

Vulnerable :

curl_setopt($ch, CURLOPT_SSL_VERIFYNONE, 1);

Non Vulnerable :

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);

Vulnerable :

RPC::XML::Client->new($uri,
    useragent => [
        ssl_opts => {
            verify_hostname => 0,
            SSL_verify_mode => SSL_VERIFY_NONE,
        },
    ],
);

Non Vulnerable :

RPC::XML::Client->new($uri,
    useragent => [
        ssl_opts => {
            verify_hostname => 0,
            SSL_verify_mode => SSL_VERIFY_PEER,
        },
    ],
);

Vulnerable :

http.verify_mode = OpenSSL::SSL::VERIFY_NONE

Non Vulnerable :

http.verify_mode = OpenSSL::SSL::VERIFY_PEER

References