Craig Younkins reported: [1] http://bugs.python.org/issue9061 that Python Mako, a template library written in Python, improperly escaped single quotes in escape.cgi. An attacker could use this flaw to conduct cross-site scripting (XSS) attacks. References: [2] http://www.makotemplates.org/CHANGES Sample public PoC (from [1]): Proof of concept: print """<body class='%s'></body>""" % cgi.escape("' onload='alert(1);' bad='") CVE Request: [3] http://www.openwall.com/lists/oss-security/2010/06/30/9
The CVE identifier of CVE-2010-2480 has been assigned to this: Mako before 0.3.4 relies on the cgi.escape function in the Python standard library for cross-site scripting (XSS) protection, which makes it easier for remote attackers to conduct XSS attacks via vectors involving single-quote characters and a JavaScript onLoad event handler for a BODY element. References: [1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-2480 [2] http://bugs.python.org/issue9061 [3] http://www.makotemplates.org/CHANGES [4] http://secunia.com/advisories/39935