Live threats

All CVEs / Python

CVE-2011-4940Python

Low 2.6 No auth needed

Priority
31
CVSS 2.0
2.6
EPSS
3.2%
probability of exploitation in 30 days · percentile 89
Auth required
No
Published
Jun 27, 2012
Updated
Jun 16, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
Vector
AV:N/AC:H/Au:N/C:N/I:P/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Python.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected products (CPE)

VendorProductVersions
pythonpython≤ 2.5.6
pythonpython0.9.0
pythonpython0.9.1
pythonpython1.2
pythonpython1.3
pythonpython1.5.2
pythonpython1.6
pythonpython1.6.1
pythonpython2.0.1
pythonpython2.1.1
pythonpython2.1.2
pythonpython2.1.3
pythonpython2.2.1
pythonpython2.2.2
pythonpython2.2.3
pythonpython2.3.1
pythonpython2.3.2
pythonpython2.3.3
pythonpython2.3.4
pythonpython2.3.5
pythonpython2.3.7
pythonpython2.4.1
pythonpython2.4.2
pythonpython2.4.3
pythonpython2.4.4
pythonpython2.4.6
pythonpython2.5.1
pythonpython2.5.2
pythonpython2.5.3
pythonpython2.5.4
pythonpython2.6.1
pythonpython2.6.2
pythonpython2.6.3
pythonpython2.6.4
pythonpython2.6.5
pythonpython2.6.6
pythonpython2.7.1
pythonpython2.7.1
pythonpython2.7.2

Official sources

References

Links published by the sources. Open them with care.