Welcome! » Log In » Create A New Profile

<script>alert('You have been pwned')</script> purification

Posted by cluelesscoder 

Hi - my colleague noticed that this input (using version 4.7.0) did not seem to ultimately properly sanitized and ended up executing when it reached the frontend: <script>alert('You have been pwned')</script>

It is eventually inserted into a handlebars template.

<script>alert("you have been megapwned by G")</script> seemed to be properly escaped.

Is this intended behavior? I thought maybe it was related to something like the issue mentioned at http://htmlpurifier.org/phorum/read.php?3,7755,7755#msg-7755 since this text is technically already escaped.

Yeah, this is not HTML Purifier's problem: whatever it's output, it was properly escaped; the problem is some later frontend code *unescaping* the escapes and interpreting the HTML, whatever it is. That's wrong wrong wrong.

Sorry, you do not have permission to post/reply in this forum.