Skip to content
Fencer Intel
low 2.6

CVE-2011-4940 json

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 befo…

published 2012-06-27 14 y ago modified 2026-06-16 4 mo ago also EUVD-2011-4850

cvss
2.6
version 2.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.2%
EPSS 3.2% chance of exploitation in 30 days, percentile 88%
public exploits
0
none known

Summary

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.

Patch / fix

  • python2.7 Debian 11 2.7.2-8

debian advisories DEBIAN-CVE-2011-4940

  • python RHEL 5 2.4.3-46.el5_8.2
  • tkinter RHEL 5 2.4.3-46.el5_8.2
  • python-libs RHEL 5 2.4.3-46.el5_8.2
  • python-tools RHEL 5 2.4.3-46.el5_8.2
  • python RHEL 6 2.6.6-29.el6_2.2
  • tkinter RHEL 6 2.6.6-29.el6_2.2
  • python-libs RHEL 6 2.6.6-29.el6_2.2
  • python-test RHEL 6 2.6.6-29.el6_2.2

red hat advisories RHSA-2012:0745RHSA-2012:0744

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2011-4940 updated cvss 2.6

python: potential XSS in SimpleHTTPServer's list_directory()

  • Red Hat Enterprise Linux 4 python
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux (v. 5 server) python 2.4.3-46.el5_8.2, tkinter 2.4.3-46.el5_8.2, python-libs 2.4.3-46.el5_8.2, python-tools 2.4.3-46.el5_8.2 Red Hat Enterprise Linux Desktop (v. 5 client) python 2.4.3-46.el5_8.2, tkinter 2.4.3-46.el5_8.2, python-libs 2.4.3-46.el5_8.2, python-tools 2.4.3-46.el5_8.2
    fixed: vendor fix RHSA-2012:0745
  • Red Hat Enterprise Linux Desktop (v. 6) python 2.6.6-29.el6_2.2, tkinter 2.6.6-29.el6_2.2, python-libs 2.6.6-29.el6_2.2 Red Hat Enterprise Linux Desktop Optional (v. 6) python 2.6.6-29.el6_2.2, python-test 2.6.6-29.el6_2.2, python-tools 2.6.6-29.el6_2.2 Red Hat Enterprise Linux HPC Node (v. 6) python 2.6.6-29.el6_2.2, python-libs 2.6.6-29.el6_2.2 Red Hat Enterprise Linux HPC Node Optional (v. 6) python 2.6.6-29.el6_2.2, tkinter 2.6.6-29.el6_2.2, python-test 2.6.6-29.el6_2.2, python-tools 2.6.6-29.el6_2.2 Red Hat Enterprise Linux Server (v. 6) python 2.6.6-29.el6_2.2, tkinter 2.6.6-29.el6_2.2, python-libs 2.6.6-29.el6_2.2 Red Hat Enterprise Linux Server Optional (v. 6) python 2.6.6-29.el6_2.2, tkinter 2.6.6-29.el6_2.2, python-test 2.6.6-29.el6_2.2, python-tools 2.6.6-29.el6_2.2
    +2 more products
    Red Hat Enterprise Linux Workstation (v. 6) python 2.6.6-29.el6_2.2, tkinter 2.6.6-29.el6_2.2, python-libs 2.6.6-29.el6_2.2 Red Hat Enterprise Linux Workstation Optional (v. 6) python 2.6.6-29.el6_2.2, python-test 2.6.6-29.el6_2.2, python-tools 2.6.6-29.el6_2.2
    fixed: vendor fix RHSA-2012:0744
  • Red Hat RHEL Desktop Workstation (v. 5 client) python 2.4.3-46.el5_8.2
    fixed: vendor fix RHSA-2012:0745

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

3.18% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 2.0 2.6 AV:N/AC:H/Au:N/C:N/I:P/A:N

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.