curl / Docs / curl CVEs / cert name check ignore OpenSSL

CVE-2013-4545

cert name check ignore OpenSSL

Project curl Security Advisory, November 15th 2013 Permalink

VULNERABILITY

libcurl is vulnerable to a case of missing out the checking of the certificate CN or SAN name field when the digital signature verification is turned off.

libcurl offers two separate and independent options for verifying a server's TLS certificate. CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST. The first one tells libcurl to verify the trust chain using a CA cert bundle, while the second tells libcurl to make sure that the name fields in the server certificate meets the criteria. Both options are enabled by default.

This flaw had the effect that when an application disabled CURLOPT_SSL_VERIFYPEER, libcurl mistakenly also disabled the CURLOPT_SSL_VERIFYHOST check. Applications can disable CURLOPT_SSL_VERIFYPEER and still achieve security by doing the check on its own using other means.

The curl command line tool is not affected by this problem as it either enables both options or disables both at the same time.

INFO

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2013-4545 to this issue.

CWE-297: Improper Validation of Certificate with Host Mismatch

Severity: Medium

AFFECTED VERSIONS

This flaw only exists in the TLS backend that uses OpenSSL. If libcurl is built with another TLS backend, it is not affected.

SOLUTION

libcurl 7.33.0 makes sure that both options independently causes the operation to fail unless the criteria is fulfilled.

The fix was committed, pushed and released without the full security implications being properly realized.

RECOMMENDATIONS

We suggest you take one of the following actions immediately, in order of preference:

A - Upgrade to curl and libcurl 7.33.0

B - Apply this patch and rebuild libcurl

C - Make sure CURLOPT_SSL_VERIFYPEER is not disabled

D - Build libcurl with another TLS backend than OpenSSL

TIMELINE

Vulnerability reported by Scott Cantor.

It was reported to the curl project on November 6th 2013. We contacted distros@openwall on November 8th.

libcurl 7.33.0 was released on October 14th 2013, already containing this fix.

CREDITS

Thanks a lot!