"GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc."
"curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, TFTP, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks."
A buffer overflow vulnerability in multiple vendor's implementations of curl and wget allows attackers to execute arbitrary code.
Vulnerable Systems:
* wget version 1.10
* curl version 7.13.2
* libcurl version 7.13.2
Immune Systems:
* wget version 1.10.2
* curl version 7.10.5 and prior
* libcurl version 7.10.5 and prior
* curl version 7.15.0
* libcurl version 7.15.0
The vulnerability specifically exists due to insufficient bounds checking on user-supplied data supplied to a memory copy operation. The memcpy() of the supplied ntlm username to ntlmbuf shown below results in a stack overflow:
http-ntlm.c in ntlm_output() on line 532:
/* size is now 64 */
size=64;
ntlmbuf[62]=ntlmbuf[63]=0;
The resulting stack overflow can be leveraged to gain arbitrary code execution with user privileges.
Successful exploitation of the vulnerability allows remote attackers to execute arbitrary code with permissions of the http client process.
User interaction is required. Exploitation requires a user to use one of the affected clients to connect to a malicious website.
This vulnerability affects both wget and curl clients similarly because wget 1.10 adopted the curl ntlm authentication source code into its own code base. The described vulnerability requires that ntlm authentication is enabled in the affected client versions. A factor that somewhat increases the risk of this vulnerability is that a client can be forced to reconnect using NTLM authentication by issuing a HTTP 302 REDIRECT command to the connecting client.