{"vuid":"VU#789543","idnumber":"789543","name":"IIS decodes filenames superfluously after applying security checks","keywords":["microsoft","IIS","decode","MS01-026"],"overview":"Microsoft IIS decodes filenames after applying security checks, allowing an attacker to execute commands.","clean_desc":"To accomodate complex URIs, RFC 2396 specifies a means to encode arbitrary octets using hexadecimal characters and the percent sign (%). Quoting from RFC 2396: An escaped octet is encoded as a character triplet, consisting of the percent character \"%\" followed by the two hexadecimal digits representing the octet code. For example, \"%20\" is the escaped encoding for the US-ASCII space character. escaped     = \"%\" hex hex\nhex         = digit | \"A\" | \"B\" | \"C\" | \"D\" | \"E\" | \"F\" This makes it possible to express certain characters and strings unambiguosly, but it requires the server to decode the information provided in a URI. Thus, if an HTTP server is provided a reference to a filename encoded as follows: A%20Filename%20With%20Spaces It will decode each occurence of %20 to a space, and then it will try to find a file named A Filename With Spaces This is a fundamental feature of HTTP servers, and is not specific to IIS in any way. Any octet can be encoded in this way, including \"normal\" characters like \".\" (dot). Thus an intruder could attempt to access files outside of the web folders by encoding relative path references in this scheme. IIS includes checks for \"illegal\" URIs even after they have been decoded. However, IIS decodes filenames twice. After the first decoding, IIS applies security checks to see if access to the specified file is permitted. The second decoding, which is superfluous, may result in a reference to a file outside the web folders, and after the security checks (on the results of the first decoding) have been applied. For more information, see Microsoft Security Bulletin MS01-026.","impact":"Remote users can execute arbitrary commands with the privileges of the IUSR_machinename account.","resolution":"Update your version of IIS according to the instructions in http://www.microsoft.com/Downloads/Release.asp?ReleaseID=29787 (for IIS 4.0) and http://www.microsoft.com/Downloads/Release.asp?ReleaseID=29764 (for IIS 5.0).","workarounds":"","sysaffected":"","thanks":"Our thanks to \nNSfocus\n who originally discovered this problem. Their original advisory can be found at\n http://www.nsfocus.com/english/homepage/sa01-02.htm","author":"This document was written by Shawn V. Hernan.","public":["http://www.microsoft.com/technet/security/bulletin/MS01-026.asp","http://www.microsoft.com/Downloads/Release.asp?ReleaseID=29787","http://www.microsoft.com/Downloads/Release.asp?ReleaseID=29764","http://www.nsfocus.com/english/homepage/sa01-02.htm","http://www.microsoft.com/technet/security/mbrsrvcl.asp","http://www.microsoft.com/technet/security/iis5chk.asp","http://www.microsoft.com/technet/security/iischk.asp","http://www.securityfocus.com/bid/2708"],"cveids":["CVE-2001-0333"],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2001-05-15T03:07:22Z","publicdate":"2001-05-14T00:00:00Z","datefirstpublished":"2001-05-15T05:26:09Z","dateupdated":"2001-09-18T19:15:57Z","revision":12,"vrda_d1_directreport":"","vrda_d1_population":"","vrda_d1_impact":"","cam_widelyknown":"20","cam_exploitation":"10","cam_internetinfrastructure":"17","cam_population":"15","cam_impact":"15","cam_easeofexploitation":"20","cam_attackeraccessrequired":"20","cam_scorecurrent":"79.3125","cam_scorecurrentwidelyknown":"79.3125","cam_scorecurrentwidelyknownexploited":"96.1875","ipprotocol":"","cvss_accessvector":"","cvss_accesscomplexity":"","cvss_authentication":null,"cvss_confidentialityimpact":"","cvss_integrityimpact":"","cvss_availabilityimpact":"","cvss_exploitablity":null,"cvss_remediationlevel":"","cvss_reportconfidence":"","cvss_collateraldamagepotential":"","cvss_targetdistribution":"","cvss_securityrequirementscr":"","cvss_securityrequirementsir":"","cvss_securityrequirementsar":"","cvss_basescore":"","cvss_basevector":"","cvss_temporalscore":"","cvss_environmentalscore":"","cvss_environmentalvector":"","metric":79.3125,"vulnote":null}