Cross-site scripting in Python - CVE-2011-4940
Published: June 27, 2012 / Updated: July 28, 2020
Vulnerability details
The vulnerability allows a remote attacker to perform cross-site scripting (XSS) attacks.
The vulnerability exists due to insufficient sanitization of user-supplied data when processing data passed via UTF-7 encoding. A remote attacker can trick the victim to follow a specially crafted link and execute arbitrary HTML and script code in user's browser in context of vulnerable website.
Successful exploitation of this vulnerability may allow a remote attacker to steal potentially sensitive information, change appearance of the web page, perform phishing and drive-by-download attacks.
Affected software
Amazon Linux AMI
Ubuntu
python (Alpine package)
python2.4 (Ubuntu package)
python2.4-minimal (Ubuntu package)
python2.5-minimal (Ubuntu package)
python2.5 (Ubuntu package)
python2.6 (Ubuntu package)
python2.6-minimal (Ubuntu package)
python2.7-minimal (Ubuntu package)
python2.7 (Ubuntu package)
How to mitigate CVE-2011-4940
python (Alpine package) - update to 2.6.7-r0
python2.4 (Ubuntu package) - update to 2.4.5-1ubuntu4.4
python2.4-minimal (Ubuntu package) - update to 2.4.5-1ubuntu4.4
python2.5-minimal (Ubuntu package) - update to 2.5.2-2ubuntu6.2
python2.5 (Ubuntu package) - update to 2.5.2-2ubuntu6.2
python2.6 (Ubuntu package) - addressed in versions 2.6.5-1ubuntu6.1, 2.6.6-6ubuntu7.1, 2.6.7-4ubuntu1.1
python2.6-minimal (Ubuntu package) - addressed in versions 2.6.5-1ubuntu6.1, 2.6.6-6ubuntu7.1, 2.6.7-4ubuntu1.1
python2.7-minimal (Ubuntu package) - addressed in versions 2.7.1-5ubuntu2.2, 2.7.2-5ubuntu1.1
python2.7 (Ubuntu package) - addressed in versions 2.7.1-5ubuntu2.2, 2.7.2-5ubuntu1.1
External 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