Req #18027 [Opn->Asn]: script is vulnerable to XSS via use of svg/animate tags

From: Date: Fri, 05 Nov 2010 19:28:42 +0000
Subject: Req #18027 [Opn->Asn]: script is vulnerable to XSS via use of svg/animate tags
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-5023@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=18027&edit=1 ID: 18027 Updated by: demrit@php.net Reported By: cbaxter at tnsi dot com Summary: script is vulnerable to XSS via use of svg/animate tags -Status: Open +Status: Assigned Type: Feature/Change Request Package: HTML_Safe Package Version: 0.10.1 PHP Version: Irrelevant -Assigned To: +Assigned To: demrit Roadmap Versions: New Comment: -Status: Open +Status: Assigned -Assigned To: +Assigned To: demrit Previous Comments: ------------------------------------------------------------------------ [2010-11-05 18:56:11] cbaxter Description: ------------ The script is open to XSS attacks when done using the svg/animate tags as not included in deleteTags array. Test script: --------------- <html><head></head><body> <?php $doc = '"><svg><animate attributeName=onunload to=alert(document.location) /></svg><'; require_once('HTML/Safe.php'); $parser = new HTML_Safe; $parser->clear(); $result = $parser->parse($doc); print "<br> $result"; ?></body></html> Expected result: ---------------- <html><head></head><body> <br> "></body></html> Actual result: -------------- <html><head></head><body> <br> "><svg><animate attributename="onunload" to="alert(document.location)"></animate></svg></body> </html> ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=18027&edit=1

« previous php.pear.bugs (#5023) next »