------------------------------------------------------------------------ Cross-Site Scripting vulnerability in Top 10 - Popular posts plugin for WordPress ------------------------------------------------------------------------ Yorick Koster, July 2016 ------------------------------------------------------------------------ Abstract ------------------------------------------------------------------------ A Cross-Site Scripting vulnerability was found in the Top 10 - Popular posts WordPress Plugin. This issue allows an attacker to perform a wide variety of actions, such as stealing Administrators' session tokens, or performing arbitrary actions on their behalf. In order to exploit this issue, the attacker has to lure/force a logged on WordPress Administrator into opening a malicious website. ------------------------------------------------------------------------ OVE ID ------------------------------------------------------------------------ OVE-20160712-0017 ------------------------------------------------------------------------ Tested versions ------------------------------------------------------------------------ This issue was successfully tested on Top 10 - Popular posts plugin for WordPress [2] WordPress Plugin version 2.3.0. ------------------------------------------------------------------------ Fix ------------------------------------------------------------------------ This issue is resolved in Top 10 version 2.3.1 [3]. ------------------------------------------------------------------------ Introduction ------------------------------------------------------------------------ The Top 10 - Popular posts plugin for WordPress [2] WordPress Plugin tracks daily and total visits on blog posts. Display the count as well as popular and trending posts. A Cross-Site Scripting vulnerability was found in the Top 10 WordPress Plugin. This issue allows an attacker to perform a wide variety of actions, such as stealing Administrators' session tokens, or performing arbitrary actions on their behalf. In order to exploit this issue, the attacker has to lure/force a logged on WordPress Administrator into opening a malicious website. ------------------------------------------------------------------------ Details ------------------------------------------------------------------------ The issue exists in the file class-stats.php and is caused by the lack of output encoding on the page request parameter. The vulnerable code is listed below.
------------------------------------------------------------------------ References ------------------------------------------------------------------------ [1] https://sumofpwn.nl/advisory/2016/cross_site_scripting_vulnerability_in_top_10___popular_posts_plugin_for_wordpress.html [2] https://wordpress.org/plugins/top-10/ [3] https://downloads.wordpress.org/plugin/top-10.zip