CVE-2011-4940

Summary

CVECVE-2011-4940
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2012-06-27 10:18:36 UTC
Updated2026-04-29 01:13:23 UTC
DescriptionThe list_directory function in Lib/SimpleHTTPServer.py in SimpleHTTPServer in Python before 2.5.6c1, 2.6.x before 2.6.7 rc2, and 2.7.x before 2.7.2 does not place a charset parameter in the Content-Type HTTP header, which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks against Internet Explorer 7 via UTF-7 encoding.

Risk And Classification

Primary CVSS: v2.0 2.6 from [email protected]

AV:N/AC:H/Au:N/C:N/I:P/A:N

Problem Types: CWE-79 | n/a

CVSS v2.0 Breakdown

Access Vector
Network
Access Complexity
High
Authentication
None
Confidentiality
None
Integrity
Partial
Availability
None

AV:N/AC:H/Au:N/C:N/I:P/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Python Python 0.9.0 All All All
Application Python Python 0.9.1 All All All
Application Python Python 1.2 All All All
Application Python Python 1.3 All All All
Application Python Python 1.5.2 All All All
Application Python Python 1.6 All All All
Application Python Python 1.6.1 All All All
Application Python Python 2.0.1 All All All
Application Python Python 2.1.1 All All All
Application Python Python 2.1.2 All All All
Application Python Python 2.1.3 All All All
Application Python Python 2.2.1 All All All
Application Python Python 2.2.2 All All All
Application Python Python 2.2.3 All All All
Application Python Python 2.3.1 All All All
Application Python Python 2.3.2 All All All
Application Python Python 2.3.3 All All All
Application Python Python 2.3.4 All All All
Application Python Python 2.3.5 All All All
Application Python Python 2.3.7 All All All
Application Python Python 2.4.1 All All All
Application Python Python 2.4.2 All All All
Application Python Python 2.4.3 All All All
Application Python Python 2.4.4 All All All
Application Python Python 2.4.6 All All All
Application Python Python 2.5.1 All All All
Application Python Python 2.5.2 All All All
Application Python Python 2.5.3 All All All
Application Python Python 2.5.4 All All All
Application Python Python 2.6.1 All All All
Application Python Python 2.6.2 All All All
Application Python Python 2.6.3 All All All
Application Python Python 2.6.4 All All All
Application Python Python 2.6.5 All All All
Application Python Python 2.6.6 All All All
Application Python Python 2.7.1 All All All
Application Python Python 2.7.1 rc1 All All
Application Python Python 2.7.2 rc1 All All
Application Python Python All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na N/a affected n/a Not specified

References

ReferenceSourceLinkTags
USN-1613-2: Python 2.4 vulnerabilities | Ubuntu af854a3a-2127-422b-91ae-364da2661108 www.ubuntu.com
Security Advisory SA50858 - Ubuntu update for python - Secunia af854a3a-2127-422b-91ae-364da2661108 secunia.com
USN-1613-1: Python 2.5 vulnerabilities | Ubuntu af854a3a-2127-422b-91ae-364da2661108 www.ubuntu.com
Bug 803500 – CVE-2011-4940 python: potential XSS in SimpleHTTPServer's list_directory() af854a3a-2127-422b-91ae-364da2661108 bugzilla.redhat.com
Python SimpleHTTPServer 'list_directory()' Function Cross Site Scripting Vulnerability af854a3a-2127-422b-91ae-364da2661108 www.securityfocus.com
USN-1592-1: Python 2.7 vulnerabilities | Ubuntu af854a3a-2127-422b-91ae-364da2661108 www.ubuntu.com
Security Advisory SA51024 - Ubuntu update for python2.5 - Secunia af854a3a-2127-422b-91ae-364da2661108 secunia.com
Security Advisory SA51040 - Ubuntu update for python2.4 - Secunia af854a3a-2127-422b-91ae-364da2661108 secunia.com
JVN#51176027: Python SimpleHTTPServer vulnerable to cross-site scripting af854a3a-2127-422b-91ae-364da2661108 jvn.jp
jvndb.jvn.jp/jvndb/JVNDB-2012-000063 af854a3a-2127-422b-91ae-364da2661108 jvndb.jvn.jp
Issue 11442: list_directory() in SimpleHTTPServer.py should add charset=... to Content-type header - Python tracker af854a3a-2127-422b-91ae-364da2661108 bugs.python.org
USN-1596-1: Python 2.6 vulnerabilities | Ubuntu af854a3a-2127-422b-91ae-364da2661108 www.ubuntu.com
Red Hat Customer Portal MITRE access.redhat.com
Red Hat Customer Portal MITRE access.redhat.com
access.redhat.com | CVE-2011-4940 MITRE access.redhat.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report