Bug 803500 (CVE-2011-4940)

Summary: CVE-2011-4940 python: potential XSS in SimpleHTTPServer's list_directory()
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dmalcolm, jlieskov, katzj
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-18 10:17:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 805382, 805383, 805384, 805385, 808303, 808304, 808305    
Bug Blocks: 790031    

Description Vincent Danen 2012-03-14 20:23:45 UTC
A flaw was reported [1] in Python's SimpleHTTPServer's list_directory() function.  Due to a missing charset parameter, if a user were to connect to SimpleHTTPServer using IE7, which engages in encoding-sniffing and can be tricked into interpretting the output as UTF7.  Because of this, an attacker could hide <script> tags in UTF7-encoded characters which do not get quoted by cgi.encode(), allowing XSS attacks.

This has been corrected upstream in version 2.6.7rc2 [2], 2.5.6c1 [3].  It may be fixed in 2.7 as well, but I was unable to find a commit to match it against.

[1] http://bugs.python.org/issue11442
[2] http://svn.python.org/view/python/branches/release26-maint/Lib/SimpleHTTPServer.py?r1=66717&r2=88831&view=patch
[3] http://svn.python.org/view/python/branches/release25-maint/Lib/SimpleHTTPServer.py?r1=53148&r2=88815&view=patch

Comment 1 Kurt Seifried 2012-03-15 04:34:30 UTC
Added CVE as per http://www.openwall.com/lists/oss-security/2012/03/15/1

Comment 3 Huzaifa S. Sidhpurwala 2012-03-30 05:47:25 UTC
Created python tracking bugs for this issue

Affects: fedora-all [bug 808303]

Comment 4 Huzaifa S. Sidhpurwala 2012-03-30 05:47:29 UTC
Created python26 tracking bugs for this issue

Affects: epel-5 [bug 808305]

Comment 5 Huzaifa S. Sidhpurwala 2012-03-30 05:47:32 UTC
Created python3 tracking bugs for this issue

Affects: fedora-all [bug 808304]

Comment 7 errata-xmlrpc 2012-06-18 12:32:49 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:0744 https://rhn.redhat.com/errata/RHSA-2012-0744.html

Comment 8 errata-xmlrpc 2012-06-18 12:42:57 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2012:0745 https://rhn.redhat.com/errata/RHSA-2012-0745.html

Comment 9 Jan Lieskovsky 2012-06-26 12:35:12 UTC
*** Bug 835496 has been marked as a duplicate of this bug. ***