All vulnerabilities

Servers and applications

CVE-2011-4940

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.

Severity
Low 2.6
Published
27 Jun 2012
Last changed
16 Jun 2026
Added to UpHeron
21 Oct 2026
Exploit chance
3.2% in the next 30 daysHigher than 88% of CVEs. EPSS by FIRST, 12 Nov 2026
Weakness
Cross-site scripting (CWE-79)
Attack
Over the network · Only under certain conditions · No login needed
Attacker can
Change some data
CVSS vector
AV:N/AC:H/Au:N/C:N/I:P/A:N
Sources
NVD

Affected software

SoftwareAffected versions
PythonServers and applications · cpe:a:python:python
  • Version 2.7.2-rc1
  • Version 2.7.1
  • Version 2.7.1-rc1
  • Version 2.6.6
All 39 release lines
  • Every version up to 2.5.6
  • Version 0.9.0
  • Version 0.9.1
  • Version 1.2
  • Version 1.3
  • Version 1.5.2
  • Version 1.6
  • Version 1.6.1
  • Version 2.0.1
  • Version 2.1.1
  • Version 2.1.2
  • Version 2.1.3
  • Version 2.2.1
  • Version 2.2.2
  • Version 2.2.3
  • Version 2.3.1
  • Version 2.3.2
  • Version 2.3.3
  • Version 2.3.4
  • Version 2.3.5
  • Version 2.3.7
  • Version 2.4.1
  • Version 2.4.2
  • Version 2.4.3
  • Version 2.4.4
  • Version 2.4.6
  • Version 2.5.1
  • Version 2.5.2
  • Version 2.5.3
  • Version 2.5.4
  • Version 2.6.1
  • Version 2.6.2
  • Version 2.6.3
  • Version 2.6.4
  • Version 2.6.5
  • Version 2.6.6
  • Version 2.7.1-rc1
  • Version 2.7.1
  • Version 2.7.2-rc1

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2011-4940
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2011-4940