CVE-2011-4940
The list_directory function in Lib/SimpleHTTPServer.py in SimpleHTTPServer in Python before 2.5...
CVE-2011-4940 is a low vulnerability (CVSS 2.6) in Python, published June 27, 2012. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.18%, the 88th percentile. Fixed in python2.7 2.7.2-8.
The 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.
Exploit likelihood
What each source reports
NVD Score used
2.6
The 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.
- Record
CVE-2011-4940- CVSS 2.0
- 2.6 Low
AV:N/AC:H/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List No score
The 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.
- Record
CVE-2011-4940- Updated
- 2026-11-02
EUVDEUVD-2011-4850 No score
The 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.
- Record
EUVD-2011-4850- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-cr6h-6cqx-mw3f No score
The list_directory function in Lib/SimpleHTTPServer.py in SimpleHTTPServer in Python before 2.5...
The 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.
- Record
GHSA-cr6h-6cqx-mw3f- Weakness
- CWE-79
- Updated
- 2026-11-02
OSVAZL-109590 No score
CVE-2011-4940 affecting package python-py 1.11.0-1
The 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.
- Record
AZL-109590- Updated
- 2026-11-02
OSV No score
The 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.
- Record
CVE-2011-4940- Updated
- 2026-11-02
OSVDEBIAN-CVE-2011-4940 No score
The 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.
- Record
DEBIAN-CVE-2011-4940- Updated
- 2026-11-02
OSVPSF-2012-1 No score
SimpleHTTPServer UTF-7
The 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.
- Record
PSF-2012-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
python-pyAzure Linux:3 |
through 1.11.0-1 | None known |
python2.7Debian:11 |
before 2.7.2-8 | 2.7.2-8 |
python2.6Debian:6.0 |
before 2.6.6-8+deb6u1, plus listed versions 2.6.6-8 |
2.6.6-8+deb6u1 |
pythonRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-debuginfoRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-libsRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
tkinterRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-develRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-testRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-toolsRed Hat:enterprise_linux:6::client |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
Show 35 moreShow less
| Package | Affected | Fixed |
|---|---|---|
pythonRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-debuginfoRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-libsRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-develRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-testRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-toolsRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
tkinterRed Hat:enterprise_linux:6::computenode |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
pythonRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-debuginfoRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-develRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-libsRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
tkinterRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-testRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-toolsRed Hat:enterprise_linux:6::server |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
pythonRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-debuginfoRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-develRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-libsRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
tkinterRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-testRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
python-toolsRed Hat:enterprise_linux:6::workstation |
before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
pythonRed Hat:enterprise_linux:5::client |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-debuginfoRed Hat:enterprise_linux:5::client |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-libsRed Hat:enterprise_linux:5::client |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-toolsRed Hat:enterprise_linux:5::client |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
tkinterRed Hat:enterprise_linux:5::client |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
pythonRed Hat:enterprise_linux:5::client_workstation |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-debuginfoRed Hat:enterprise_linux:5::client_workstation |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-develRed Hat:enterprise_linux:5::client_workstation |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
pythonRed Hat:enterprise_linux:5::server |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-debuginfoRed Hat:enterprise_linux:5::server |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-develRed Hat:enterprise_linux:5::server |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-libsRed Hat:enterprise_linux:5::server |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
python-toolsRed Hat:enterprise_linux:5::server |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
tkinterRed Hat:enterprise_linux:5::server |
before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
ubuntu.com/usn/USN-1592-1
jvn.jp/en/jp/JVN51176027/index.html
secunia.com/advisories/51040
secunia.com/advisories/50858
bugs.python.org/issue11442
securityfocus.com/bid/54083
Show 30 moreShow less
ubuntu.com/usn/USN-1596-1
ubuntu.com/usn/USN-1613-2
jvndb.jvn.jp/jvndb/JVNDB-2012-000063
bugzilla.redhat.com/show_bug.cgi?id=803500
secunia.com/advisories/51024
ubuntu.com/usn/USN-1613-1
nvd.nist.gov/vuln/detail/CVE-2011-4940
access.redhat.com/errata/RHSA-2012:0744
access.redhat.com/errata/RHSA-2012:0745
access.redhat.com/security/cve/CVE-2011-4940
github.com/advisories/GHSA-cr6h-6cqx-mw3f
security-tracker.debian.org/tracker/CVE-2011-4940
access.redhat.com/security/updates/classification
ocert.org/advisories/ocert-2011-003.html
rhn.redhat.com/errata/RHSA-2012-0731.html
bugzilla.redhat.com/show_bug.cgi?id=750555
bugzilla.redhat.com/show_bug.cgi?id=758905
bugzilla.redhat.com/show_bug.cgi?id=789790
security.access.redhat.com/data/csaf/v2/advisories/2012/rhsa-2012_0744.json
cve.org/CVERecord?id=CVE-2011-4940
access.redhat.com/security/cve/CVE-2011-4944
cve.org/CVERecord?id=CVE-2011-4944
nvd.nist.gov/vuln/detail/CVE-2011-4944
access.redhat.com/security/cve/CVE-2012-0845
cve.org/CVERecord?id=CVE-2012-0845
nvd.nist.gov/vuln/detail/CVE-2012-0845
access.redhat.com/security/cve/CVE-2012-1150
cve.org/CVERecord?id=CVE-2012-1150
nvd.nist.gov/vuln/detail/CVE-2012-1150
security.access.redhat.com/data/csaf/v2/advisories/2012/rhsa-2012_0745.json