Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   Application (Generic)  >   wget Vendors:   GNU [multiple authors]
wget Buffer Overflow in Processing NTLM Authentication Values May Let Remote Users Execute Arbitrary Code
SecurityTracker Alert ID:  1015056
SecurityTracker URL:
CVE Reference:   CVE-2005-3185   (Links to External Site)
Updated:  Jan 22 2008
Original Entry Date:  Oct 13 2005
Impact:   Execution of arbitrary code via network, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): prior to 1.10.2
Description:   iDEFENSE reported a vulnerability in wget. A remote user can cause arbitrary code to be executed on the target user's system.

The software does not properly validate server-supplied NTLM user name data. When the target user connects to a remote server, the remote server can issue an HTTP 30x redirect command that redirects the target user to a URL that includes a specially crafted NTLM user name value to trigger a stack overflow and execute arbitrary code on the target user's system. The code will run with the privileges of the target user.

A user name and domain name that, combined, are longer than 192 bytes will trigger the overflow.

NTLM authentication must be enabled on the client for the exploit to work.

The vendor was notified on October 12, 2005.

The original advisory is available at:

Impact:   A remote user can cause arbitrary code to be executed on the target user's system when the target user connects to a malicious site.
Solution:   The vendor has issued a fixed version (1.10.2), available at:

Vendor URL: (Links to External Site)
Cause:   Boundary error
Underlying OS:  Linux (Any), UNIX (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Nov 2 2005 (Red Hat Issues Fix) wget Buffer Overflow in Processing NTLM Authentication Values May Let Remote Users Execute Arbitrary Code
Red Hat has released a fix for Red Hat Enterprise Linux 2.1, 3, and 4.

 Source Message Contents

Subject:  iDEFENSE Security Advisory 10.13.05: Multiple Vendor wget/curl NTLM

Multiple Vendor wget/curl NTLM Username Buffer Overflow Vulnerability

iDEFENSE Security Advisory 10.13.05
October 13, 2005


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. More
information on Wget is available from the vendor website:

curl is a command line tool for transferring files with URL syntax,
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. More information
on curl is available from the vendor website:


Remote exploitation of a buffer overflow vulnerability in multiple 
vendor's implementations of curl and wget allows attackers to execute 
arbitrary code. 

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 */

    memcpy(&ntlmbuf[size], domain, domlen);
    size += domlen;

    memcpy(&ntlmbuf[size], usr, userlen);
    size += userlen;

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.


iDEFENSE Labs has confirmed the following software versions are 

    *   wget 1.10
    *   curl 7.13.2
    *   libcurl 7.13.2 


As a workaround solution, disable NTLM support in wget and curl 


wget 1.10.2 has been released to address this issue and is available for
download at:

curl has released the following patch to address this issue:

curl has also released the following security advisory:
Additionally, the maintainers of curl-web have provided the following
details on affected versions:

Affected versions: curl and libcurl 7.10.6 to and including 7.14.1

Not affected versions: curl and libcurl 7.10.5 and earlier,
  7.15.0 and later


The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2005-3185 to this issue. This is a candidate for inclusion in
the CVE list (, which standardizes names for
security problems.


10/12/2005  Initial vendor notification
10/12/2005  Initial vendor response
10/13/2005  Coordinated public disclosure


The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research

Free tools, research and upcoming events


Copyright (c) 2005 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

Go to the Top of This SecurityTracker Archive Page

Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, LLC