CVE-2011-4940Python
Low 2.6 No auth needed
Follow: this CVE · Python · Python We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Python.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| python | python | ≤ 2.5.6 |
| python | python | 0.9.0 |
| python | python | 0.9.1 |
| python | python | 1.2 |
| python | python | 1.3 |
| python | python | 1.5.2 |
| python | python | 1.6 |
| python | python | 1.6.1 |
| python | python | 2.0.1 |
| python | python | 2.1.1 |
| python | python | 2.1.2 |
| python | python | 2.1.3 |
| python | python | 2.2.1 |
| python | python | 2.2.2 |
| python | python | 2.2.3 |
| python | python | 2.3.1 |
| python | python | 2.3.2 |
| python | python | 2.3.3 |
| python | python | 2.3.4 |
| python | python | 2.3.5 |
| python | python | 2.3.7 |
| python | python | 2.4.1 |
| python | python | 2.4.2 |
| python | python | 2.4.3 |
| python | python | 2.4.4 |
| python | python | 2.4.6 |
| python | python | 2.5.1 |
| python | python | 2.5.2 |
| python | python | 2.5.3 |
| python | python | 2.5.4 |
| python | python | 2.6.1 |
| python | python | 2.6.2 |
| python | python | 2.6.3 |
| python | python | 2.6.4 |
| python | python | 2.6.5 |
| python | python | 2.6.6 |
| python | python | 2.7.1 |
| python | python | 2.7.1 |
| python | python | 2.7.2 |
Official sources
References
Links published by the sources. Open them with care.