I would like to disclose CSRF and stored XSS vulnerability in Kento post view counter plugin version 2.8 . The vulnerable Fields for XSS are kento_pvc_numbers_lang kento_pvc_today_text kento_pvc_total_text The combination of CSRF and XSS in this plugin can lead to huge damage of the website, as the two fields kento_pvc_today_text and kento_pvc_total_text are reflected on all authenticated users as well as non-authenticated user ,all the post have a footer which shows this two parameter reflected in them ,so if an attacker successfully attacks a website almost all the pages on that website will execute the malicious javascript payload on all the clients browsers visiting that website.every user visiting the website will be affected. The plugin can be found at https://wordpress.org/plugins/kento-post-view-counter/ This CSRF is tested on latest wordpress installation 4.4.2 using firefox browser. and chrome. The Code for CSRF.html is
The Vulnerable page is wp-content\plugins\kento-post-view-counter\kento-pvc-admin.php The code Reponsible for XSS : if($_POST['kentopvc_hidden'] == 'Y') { //Form data sent if(empty($_POST['kento_pvc_hide'])) { $kento_pvc_hide =""; } else { $kento_pvc_hide = $_POST['kento_pvc_hide']; } update_option('kento_pvc_hide', $kento_pvc_hide); if(empty($_POST['kento_pvc_posttype'])) { $kento_pvc_posttype =""; } else { $kento_pvc_posttype = $_POST['kento_pvc_posttype']; } update_option('kento_pvc_posttype', $kento_pvc_posttype); if(empty($_POST['kento_pvc_uniq'])) { $kento_pvc_uniq =""; } else { $kento_pvc_uniq = $_POST['kento_pvc_uniq']; } update_option('kento_pvc_uniq', $kento_pvc_uniq); $kento_pvc_numbers_lang = $_POST['kento_pvc_numbers_lang']; update_option('kento_pvc_numbers_lang', $kento_pvc_numbers_lang); $kento_pvc_today_text = $_POST['kento_pvc_today_text']; update_option('kento_pvc_today_text', $kento_pvc_today_text); $kento_pvc_total_text = $_POST['kento_pvc_total_text']; update_option('kento_pvc_total_text', $kento_pvc_total_text); --------------------------snip----------------------- ------------------snip ------------------------------