Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Zend_Filter
-
Labels:None
-
Fix Version Priority:Must Have
Description
Currently, the StripTags filter allows optionally allowing comments. However, this should never be allowed, as it's possible to perform IE-style conditional comments that could open XSS attack vectors:
$filter = new Zend_Filter_StripTags; $filter->setCommentsAllowed(true); $html = "<!--[if gte IE 4]><SCRIPT>alert('XSS');</SCRIPT><![endif]-->"; $out = $filter->filter($html); // results in: // <!--[if gte IE 4]><SCRIPT>alert('XSS');</SCRIPT><![endif]-->
Resolved in trunk and 1.9, 1.8, and 1.7 release branches.