CVE-2011-4940
CVE-2011-4940 is a low-severity vulnerability in Python with a CVSS 2.0 base score of 2.6. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-79.
Key facts
- Severity: Low (CVSS 2.0 base score 2.6)
- EPSS exploit prediction: 3% (87th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-79
- Affected product: Python
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is 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.
- How severe is CVE-2011-4940?
- CVE-2011-4940 has a CVSS 2.0 base score of 2.6, rated low severity.
- Is CVE-2011-4940 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 3% (87th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2011-4940?
- CVE-2011-4940 primarily affects Python. In total, 39 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2011-4940?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2011-4940 published?
- CVE-2011-4940 was published on 2012-06-27 and last updated on 2026-06-16.
References
- http://bugs.python.org/issue11442
- http://jvn.jp/en/jp/JVN51176027/index.html
- http://jvndb.jvn.jp/jvndb/JVNDB-2012-000063
- http://secunia.com/advisories/50858
- http://secunia.com/advisories/51024
- http://secunia.com/advisories/51040
- http://www.securityfocus.com/bid/54083
- http://www.ubuntu.com/usn/USN-1592-1
- http://www.ubuntu.com/usn/USN-1596-1
- http://www.ubuntu.com/usn/USN-1613-1
- http://www.ubuntu.com/usn/USN-1613-2
- https://bugzilla.redhat.com/show_bug.cgi?id=803500
Affected products (39)
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:0.9.0:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:0.9.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:1.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:1.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:1.5.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:1.6:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:1.6.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.0.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.1.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.1.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.1.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.2.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.2.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.2.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.3.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.3.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.3.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.3.4:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.3.5:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.3.7:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.4.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.4.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.4.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.4.4:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.4.6:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.5.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.5.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.5.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.5.4:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.6.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.6.2:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.6.3:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.6.4:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.6.5:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.6.6:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.7.1:*:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.7.1:rc1:*:*:*:*:*:*
- cpe:2.3:a:python:python:2.7.2:rc1:*:*:*:*:*:*
More vulnerabilities in Python
- CVE-2008-5031 — Critical (CVSS 10.0): Multiple integer overflows in Python 2.2.3 through 2.5.1, and 2.6, allow context-dependent attackers to have an unknown…
- CVE-2022-48565 — Critical (CVSS 9.8): An XML External Entity (XXE) issue was discovered in Python through 3.9.1. The plistlib module no longer accepts entity…
- CVE-2022-37454 — Critical (CVSS 9.8): The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow…
- CVE-2021-29921 — Critical (CVSS 9.8): In Python before 3,9,5, the ipaddress library mishandles leading zero characters in the octets of an IP address string.…
- CVE-2021-3177 — Critical (CVSS 9.8): Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code…
- CVE-2020-27619 — Critical (CVSS 9.8): In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via…
Other CWE-79 (Cross-site Scripting (XSS)) vulnerabilities
- CVE-2025-49410 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Imran Emu TC…
- CVE-2024-47875 — Critical (CVSS 10.0): DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMpurify was vulnerable to…
- CVE-2024-6886 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea…
- CVE-2023-45144 — Critical (CVSS 10.0): com.xwiki.identity-oauth:identity-oauth-ui is a package to aid in building identity and service providers based on…
- CVE-2023-45138 — Critical (CVSS 10.0): Change Request is an pplication allowing users to request changes on a wiki without publishing the changes directly.…
- CVE-2022-4361 — Critical (CVSS 10.0): Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the…
Browse all CWE-79 (Cross-site Scripting (XSS)) vulnerabilities →
Threat intelligence
Threat-intel indicators referencing this CVE:
- 121.164.135.251 (ipv4-addr)