Bug 609573 (CVE-2010-2480) - CVE-2010-2480 Python-Mako (prior v0.3.4): Improper escaping of single quotes in escape.cgi (XSS)
Summary: CVE-2010-2480 Python-Mako (prior v0.3.4): Improper escaping of single quotes ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2010-2480
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 607302 608155
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-30 16:04 UTC by Jan Lieskovsky
Modified: 2021-11-02 17:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-19 09:12:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Lieskovsky 2010-06-30 16:04:24 UTC
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

Comment 1 Jan Lieskovsky 2010-07-03 17:29:28 UTC
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


Note You need to log in before you can comment on or make changes to this bug.