Vulnerabilities · 2011 · Python
CVE-2011-4940
Python vulnerability
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.
Affected products
Python. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Python runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- bugs.python.org/issue11442
- jvn.jp/en/jp/JVN51176027/index.html
- jvndb.jvn.jp/jvndb/JVNDB-2012-000063
- secunia.com/advisories/50858
- secunia.com/advisories/51024
- secunia.com/advisories/51040
- www.securityfocus.com/bid/54083
- www.ubuntu.com/usn/USN-1592-1
- nvd.nist.gov/vuln/detail/CVE-2011-4940
- cve.org/CVERecord?id=CVE-2011-4940
More vulnerabilities in Python products
CVE-2026-21441CVE-2025-66471CVE-2025-66418CVE-2025-50182CVE-2025-50181CVE-2025-48379CVE-2025-47273CVE-2025-13837All 231
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.