Microsoft IIS Web Server Allows Remote Users to Execute Commands on the Server Due to CGI Decoding Error
SecurityTracker Alert ID: 1001530|
SecurityTracker URL: http://securitytracker.com/id/1001530
(Links to External Site)
Date: May 15 2001
Disclosure of system information, Disclosure of user information, Execution of arbitrary code via network|
Fix Available: Yes Vendor Confirmed: Yes Exploit Included: Yes |
Version(s): IIS 5.0, IIS 4.0 (except when on NT 4 with SP6/SP6a[without any new hotfix])|
NSFOCUS announced discovery of a vulnerability in Microsoft Internet Information Server that allows remote users to execute commands on the server.|
NSFOCUS reports that when loading an executable CGI program, the IIS web server will perform two successive decode operations. The first is to decode the CGI filename and determine if it is an executable file. The second is to determine CGI parameters. However, the web server will (improperly) decode the file name on the second pass. As a result, a remote user can create a malformed CGI filename to circumvent normal IIS filename security filtering (such as ".." filtering) and traverse directories.
For example, NSFOCUS reports that the following URL, if the target host has a virtual executable directory called scripts, will provide a directory listing of the C:\ directory:
Malformed URLs can be used to run commands with the privileges of the IUSER_machinename account.
A remote user can execute commands on and retrieve files from the server.|
Microsoft has prepared a fix (which will be posted shortly).|
Vendor URL: www.microsoft.com/technet/security/bulletin/MS01-026.asp (Links to External Site)
|Underlying OS: Windows (NT), Windows (2000)|
This archive entry has one or more follow-up message(s) listed below.|
Source Message Contents
NSFOCUS Security Advisory(SA2001-02)
Topic: Microsoft IIS CGI Filename Decode Error Vulnerability
Release Date: May 15, 2001
CVE Candidate Numbers: CAN-2001-0246
Microsoft IIS 4.0
Microsoft IIS 5.0
Microsoft IIS 4.0
+ Microsoft Windows NT 4 + SP6/SP6a(without any new hotfix)
NSFOCUS Security Team has found a vulnerability in filename processing
of CGI program in MS IIS4.0/5.0. CGI filename is decoded twice by error.
Exploitation of this vulnerability, intruder may run arbitrary system
When loading executable CGI program, IIS will decode twice. First, CGI
filename will be decoded to check if it is an executable file (for
example, '.exe' or '.com' suffix check-up). Successfully passing the
filename check-up, IIS will run another decode process.
Normally, only CGI parameters should be decoded in this process. But
this time IIS mistakenly decodes both CGI parameters and the decoded
CGI filename. In this way, CGI filename is decoded twice by error.
With a malformed CGI filename, attacker can get round IIS filename
security check-ups like '../' or './' check-up. In some cases, attacker
can run arbitrary system command.
For example, a character '\' will be encoded to "%5c". And the
code of these 3 characters is:
'%' = %25
'5' = %35
'c' = %63
encode this 3 characters for another time, we can get many results such
Thereby, '..\' can be represented by '..%255c' and '..%%35c', etc.
After first decoding, '..%255c' is turned into '..%5c'. IIS will take it
legal character string that can pass security check-up. But after a
decode process, it will be reverted to '..\'. Hence, attacker can use
to carry out directory traversal and run arbitrary program outside of
For example, TARGET has a virtual executable directory (e.g. "scripts")
that is located on the same driver of Windows system. Submit request
Directory list of C:\ will be revealed.
Of course, same effect can be achieved by this kind of processing to '/'
For example: "..%252f", ".%252e/"...
Note: Attacker can run commands of IUSER_machinename account
1. If executable CGI is not integrant, delete the executable virtual
directory like /scripts etc.
2. If executable virtual directory is needed, we suggest you to assign
separate local driver for it.
3. Move all command-line utilities to another directory that could be
by an attacker, and forbid GUEST group access those utilities.
2001.3.27 We informed Microsoft of this vulnerability.
2001.4.01 Microsoft replied that the bug has been reproduced.
2001.4.16 Microsoft supplied private patches for testing and the
problem had been solved.
2001.4.23 For further testing, Microsoft requested us to hold off the
release of the advisory for 2 weeks.
2001.4.30 Microsoft informed us that we should put off the release
for another week.
2001.5.14 Microsoft has released one security bulletin(MS01-026)
concerning this flaw.
The bulletin is live at :
Patches are available at:
. Internet Information Server 4.0:
. Internet Information Services 5.0:
The Common Vulnerabilities and Exposures (CVE) project has
assigned the name CAN-2001-0007 to this issue. This is a
candidate for inclusion in the CVE list (http://cve.mitre.org),
which standardizes names for security problems. Candidates
may change significantly before they become official CVE entries.
THE INFORMATION PROVIDED IS RELEASED BY NSFOCUS "AS IS"
WITHOUT WARRANTY OF ANY KIND. NSFOCUS DISCLAIMS ALL WARRANTIES, EITHER
EXPRESS OR IMPLIED, EXCEPT FOR THE WARRANTIES OF MERCHANTABILITY. IN NO
BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT,
INCIDENTAL,CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES,
EVEN IF NSFOCUS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
DISTRIBUTION OR REPRODUTION OF THE INFORMATION IS PROVIDED THAT THE
ADVISORY IS NOT MODIFIED IN ANY WAY.
NSFOCUS Security Team <email@example.com>
NSFOCUS INFORMATION TECHNOLOGY CO.,LTD
Go to the Top of This SecurityTracker Archive Page