Bug 803500 (CVE-2011-4940) - CVE-2011-4940 python: potential XSS in SimpleHTTPServer's list_directory()
Summary: CVE-2011-4940 python: potential XSS in SimpleHTTPServer's list_directory()
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2011-4940
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
: CVE-2012-2639 (view as bug list)
Depends On: 805382 805383 805384 805385 808303 808304 808305
Blocks: 790031
TreeView+ depends on / blocked
 
Reported: 2012-03-14 20:23 UTC by Vincent Danen
Modified: 2019-09-29 12:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-18 10:17:27 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0744 0 normal SHIPPED_LIVE Moderate: python security update 2012-06-18 16:31:56 UTC
Red Hat Product Errata RHSA-2012:0745 0 normal SHIPPED_LIVE Moderate: python security update 2012-06-18 16:42:17 UTC

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


Note You need to log in before you can comment on or make changes to this bug.