First published: Wed Mar 14 2012(Updated: )
A flaw was reported [1] in Python's SimpleHTTPServer's list_directory() function. Due to a missing charset parameter, if a user were to connect to SimpleHTTPServer using IE7, which engages in encoding-sniffing and can be tricked into interpretting the output as UTF7. Because of this, an attacker could hide <script> tags in UTF7-encoded characters which do not get quoted by cgi.encode(), allowing XSS attacks. This has been corrected upstream in version 2.6.7rc2 [2], 2.5.6c1 [3]. It may be fixed in 2.7 as well, but I was unable to find a commit to match it against. [1] <a href="http://bugs.python.org/issue11442">http://bugs.python.org/issue11442</a> [2] <a href="http://svn.python.org/view/python/branches/release26-maint/Lib/SimpleHTTPServer.py?r1=66717&r2=88831&view=patch">http://svn.python.org/view/python/branches/release26-maint/Lib/SimpleHTTPServer.py?r1=66717&r2=88831&view=patch</a> [3] <a href="http://svn.python.org/view/python/branches/release25-maint/Lib/SimpleHTTPServer.py?r1=53148&r2=88815&view=patch">http://svn.python.org/view/python/branches/release25-maint/Lib/SimpleHTTPServer.py?r1=53148&r2=88815&view=patch</a>
Credit: secalert@redhat.com secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
Python Python | =2.4.2 | |
Python Python | =2.5.1 | |
Python Python | =2.3.4 | |
Python Python | =2.0.1 | |
Python Python | =2.3.1 | |
Python Python | =0.9.1 | |
Python Python | =2.1.2 | |
Python Python | =0.9.0 | |
Python Python | =1.6.1 | |
Python Python | =2.2.1 | |
Python Python | =2.5.4 | |
Python Python | =1.3 | |
Python Python | =2.2.2 | |
Python Python | =2.1.1 | |
Python Python | =1.5.2 | |
Python Python | =2.3.3 | |
Python Python | =2.3.2 | |
Python Python | =1.6 | |
Python Python | =1.2 | |
Python Python | =2.4.6 | |
Python Python | =2.2.3 | |
Python Python | =2.5.2 | |
Python Python | =2.3.7 | |
Python Python | <=2.5.6 | |
Python Python | =2.5.3 | |
Python Python | =2.4.4 | |
Python Python | =2.3.5 | |
Python Python | =2.1.3 | |
Python Python | =2.4.1 | |
Python Python | =2.4.3 | |
Python Python | =2.6.6 | |
Python Python | =2.6.1 | |
Python Python | =2.6.3 | |
Python Python | =2.6.4 | |
Python Python | =2.6.2 | |
Python Python | =2.6.5 | |
Python Python | =2.7.1 | |
Python Python | =2.7.1-rc1 | |
Python Python | =2.7.2-rc1 | |
debian/python2.7 | 2.7.18-8+deb11u1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.