Skip to content

Instantly share code, notes, and snippets.

@cedriczirtacic
Created April 23, 2014 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cedriczirtacic/11229732 to your computer and use it in GitHub Desktop.
Save cedriczirtacic/11229732 to your computer and use it in GitHub Desktop.
Hesk 2.5.0 XSS (CWE-79)
--- ./inc/common.inc.php.old 2014-04-23 16:26:38.000000000 -0300
+++ ./inc/common.inc.php 2014-04-23 16:27:59.000000000 -0300
@@ -921,7 +921,7 @@
<td class="headersm" style="padding-left: 0px;"><?php echo $page_title; ?></td>
<td class="headersm" style="padding-left: 0px;text-align: right">
<script language="javascript" type="text/javascript">
- document.write('<?php echo str_replace(array('"','<','=','>'),array('\42','\74','\75','\76'),$str . '</form>'); ?>');
+ document.write('<?php echo str_replace(array('"','<','=','>',"'"),array('\42','\74','\75','\76','\47'),$str . '</form>'); ?>');
</script>
<noscript>
<?php
http://www.victim.com/ticket.php?track='),alert(document.cookie);//?&Refresh=36528&f=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment