2.6
CWE
79
Advisory Published
CVE Published
Updated

CVE-2011-4940: XSS

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 &lt;script&gt; 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&amp;r2=88831&amp;view=patch">http://svn.python.org/view/python/branches/release26-maint/Lib/SimpleHTTPServer.py?r1=66717&amp;r2=88831&amp;view=patch</a> [3] <a href="http://svn.python.org/view/python/branches/release25-maint/Lib/SimpleHTTPServer.py?r1=53148&amp;r2=88815&amp;view=patch">http://svn.python.org/view/python/branches/release25-maint/Lib/SimpleHTTPServer.py?r1=53148&amp;r2=88815&amp;view=patch</a>

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow 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

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203