not verifying certs for TLS to IP address / Schannel
Project curl Security Advisory, March 26th 2014 Permalink
When asked to do a TLS connection (HTTPS, FTPS, IMAPS, etc) to a URL specified with an IP address instead of a name, libcurl would wrongly not verify the server's name in the certificate. The signature (whether it was signed by a trusted CA) and validity (whether the date was within the certificate's lifetime and it was not revoked) verification was still performed.
This is a problem in libcurl built to use the Schannel TLS backend. Schannel is the native library provided by Microsoft Windows.
Only users on Windows can be affected by this. And only if libcurl was built to use the native TLS backend library.
The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2014-2522 to this issue.
CWE-297: Improper Validation of Certificate with Host Mismatch
This flaw has existed ever since libcurl started to support the Schannel backend.
- Affected versions: from libcurl 7.27.0 to and including 7.35.0
- Not affected versions: libcurl < 7.27.0 and >= 7.36.0
- Introduced-in: https://github.com/curl/curl/commit/aaa42aa0d594b95c6c670a37
libcurl is used by many applications, but not always advertised as such!
libcurl 7.36.0 makes sure that all TLS using requests verify the host name even if specified as an IP address in the URL.
The fix was committed to the public source code repository because the full security impact wasn't properly realized until after the fact.
We suggest you take one of the following actions immediately, in order of preference:
A - Upgrade to curl and libcurl 7.36.0
B - Apply the patch and rebuild libcurl
C - Rebuild libcurl to use another TLS backend
It was discovered by the curl project during late February 2014.
libcurl 7.36.0 was released on March 26th 2014, coordinated with the publication of this advisory.
- Reported-by: David Ryskalczyk
- Patched-by: David Ryskalczyk
- Help-by: Marc Hoersken
Marc Hoersken helped coordinate the bug fix.
Thanks a lot!