XSS Vulnerability
-
The featured theme jQ has an XSS (cross site scripting) vulnerability in headers.php on line 8. When it displays the search results page, it echoes out the search string verbatim, rather than properly escaping it using htmlentities (see https://www.php.net/manual/en/function.htmlentities.php).
For example, visiting the URL
devolux.org/?s=</title><script language="javscript" type="text/javascript">alert('This javascript could do anything!');</script>
would cause a javascript popup window to be displayed. This example is harmless, but a malicious person could use this vulnerability, combined with getting an admin user to click a specially crafted link, to spam the blog or do other nasty things!The fix I would recommend is to change line 8 to read
<?php if ( is_search() ) { ?><?php echo htmlentities($s,ENT_QUOTES,get_bloginfo('charset')); ?> - <?php bloginfo('name'); ?><?php } ?>
- The topic ‘XSS Vulnerability’ is closed to new replies.