cURL

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Docs > Security > libcurl SASL buffer overflow vulnerability

libcurl SASL buffer overflow vulnerability

                  libcurl SASL buffer overflow vulnerability
                  ==========================================
 
Project cURL Security Advisory, February 6th 2013
http://curl.haxx.se/docs/security.html
 
1. VULNERABILITY
 
  libcurl is vulnerable to a buffer overflow vulnerability when communicating
  with one of the protocols POP3, SMTP or IMAP.
 
  When negotiating SASL DIGEST-MD5 authentication, the function
  Curl_sasl_create_digest_md5_message() uses the data provided from the server
  without doing the proper length checks and that data is then appended to a
  local fixed-size buffer on the stack.
 
  This vulnerability can be exploited by someone who is in control of a server
  that a libcurl based program is accessing with POP3, SMTP or IMAP. For
  applications that accept user provided URLs, it is also thinkable that a
  malicious user would feed an application with a URL to a server hosting code
  targetting this flaw.
 
  This vulnerability can be used for remote code execution (RCE) on vulnerable
  systems.
 
  Both curl the command line tool and applications using the libcurl library
  are vulnerable.
 
  There is no known exploit for this problem.
 
  The Common Vulnerabilities and Exposures (CVE) project has assigned the name
  CVE-2013-0249 to this issue.
 
2. AFFECTED VERSIONS
 
  Affected versions: curl 7.26.0 to and including 7.28.1
  Not affected versions: curl < 7.26.0 and >= 7.29.0
 
  Also note that libcurl is used by many applications, and not always
  advertised as such.
 
3. THE SOLUTION
 
  libcurl 7.29.0 implements proper bounds checking and will not overflow any
  buffers even if unrealistically long data chunks are received.
 
4. RECOMMENDATIONS
 
  We suggest you take one of the following actions immediately, in order of
  preference:
 
  A - Upgrade to curl and libcurl 7.29.0
 
  B - Apply this patch and rebuild libcurl
 
      http://curl.haxx.se/curl-sasl.patch
 
  C - Rebuild curl with support for vulnerable protocols IMAP, POP3 and SMTP
      disabled.
 
  D - Disable the vulnerable protocols IMAP, POP3 and SMTP at run-time to
      forbid libcurl from using them. You can do this with the
      CURLOPT_PROTOCOLS option.
 
5. TIME LINE
 
  Vulnerability found and patched by Volema (http://volema.com/).
 
  It was reported to the curl project on January 30th 2013.
 
  curl 7.29.0 was released on February 6th 2013, coordinated with the
  publication of this flaw.
 
6. CREDITS
 
  Reported and fixed by Volema. Thanks a lot!

donate! Page updated March 21, 2014.
web site info

File upload with ASP.NET