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 befor
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.
- Published
- Jun 27, 2012
- Updated
- Jun 16, 2026
- EPSS
- 3.2% · 88th percentile
- CWE
- CWE-79
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
11
Monitor
Low priority for now.
- CVSS
- 10 / 40 · 2.6 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 3.2%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| python | python | cpe:2.3:a:python:python |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- python pythonup to 2.5.6 inclusive
- python python0.9.0
- python python0.9.1
- python python1.2
- python python1.3
- python python1.5.2
- python python1.6
- python python1.6.1
- python python2.0.1
- python python2.1.1
- python python2.1.2
- python python2.1.3
- python python2.2.1
- python python2.2.2
- python python2.2.3
- python python2.3.1
- python python2.3.2
- python python2.3.3
- python python2.3.4
- python python2.3.5
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:11 | python2.7 | before 2.7.2-8 | 2.7.2-8 |
| Debian:6.0 | python2.6 | before 2.6.6-8+deb6u1 | 2.6.6-8+deb6u1 |
| Red Hat:enterprise_linux:5::client | python | before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
| Red Hat:enterprise_linux:5::client | python-debuginfo | before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
| Red Hat:enterprise_linux:5::client | python-libs | before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
| Red Hat:enterprise_linux:5::client | python-tools | before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
| Red Hat:enterprise_linux:5::client | tkinter | before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
| Red Hat:enterprise_linux:5::client_workstation | python-devel | before 0:2.4.3-46.el5_8.2 | 0:2.4.3-46.el5_8.2 |
| Red Hat:enterprise_linux:6::client | python | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
| Red Hat:enterprise_linux:6::client | python-debuginfo | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
| Red Hat:enterprise_linux:6::client | python-devel | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
| Red Hat:enterprise_linux:6::client | python-libs | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
| Red Hat:enterprise_linux:6::client | python-test | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
| Red Hat:enterprise_linux:6::client | python-tools | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
| Red Hat:enterprise_linux:6::client | tkinter | before 0:2.6.6-29.el6_2.2 | 0:2.6.6-29.el6_2.2 |
Same product
python: all recordsOther highest-scoring records for the same primary product.
- CVE-2016-5636Integer overflow in the get_data function in zipimport.c in CPython (aka Python) before 2.7.12, 3.x before 3.4.5, and 3.5.x before 3.5.2 all47Plan
- CVE-2007-4559Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remot47Plan
- CVE-2021-3177Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Pyth46Plan
- CVE-2014-4650The CGIHTTPServer module in Python 2.7.5 and 3.3.4 does not properly handle URLs in which URL encoding is used for path separators, which al46Plan
- CVE-2018-1000802Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('C45Plan
- CVE-2020-27619In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.42Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:python2.6 | 2.6.6-8+deb6u1 · Debian:6.0 | Package registry (OSV) |
| debian:python2.7 | 2.7.2-8 · Debian:11 | Package registry (OSV) |
| red hat:python | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:python-debuginfo | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:python-devel | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:python-libs | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:python-test | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:python-tools | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:tkinter | 0:2.6.6-29.el6_2.2 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- none
- Integrity
- P · data or configuration can be modified
- Availability
- none
- Attack complexity
- High
- Confidentiality impact
- None
- Integrity impact
- P
- Availability impact
- None
Weakness class (CWE)
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')CVSS vector
AV:N/AC:H/Au:N/C:N/I:P/A:N
nvd-primary
Root cause
User content is inserted into the page as HTML. The browser interprets the content as code rather than data.
The bug in code
The whole CWE-79 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
commentEl.innerHTML = comment.body;Fixed
commentEl.textContent = comment.body;Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
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
- www.ubuntu.com/usn/USN-1596-1
- www.ubuntu.com/usn/USN-1613-1
- www.ubuntu.com/usn/USN-1613-2
- bugzilla.redhat.com/show_bug.cgi?id=803500
Vendor advisories and official records. Exploit/PoC links are deliberately left out.