------------------------------------------------------------------------ Cross-Site Scripting in Huge IT Portfolio Gallery WordPress Plugin ------------------------------------------------------------------------ Antonis Manaras, July 2016 ------------------------------------------------------------------------ Abstract ------------------------------------------------------------------------ A Cross-Site Scripting vulnerability was found in the Huge IT Portfolio Gallery 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-20160724-0009 ------------------------------------------------------------------------ Tested versions ------------------------------------------------------------------------ This issue was successfully tested on Portfolio Gallery [2] version 2.0.77. ------------------------------------------------------------------------ Fix ------------------------------------------------------------------------ The issue is fixed in Portfolio Gallery [3] version 2.1.11. ------------------------------------------------------------------------ Introduction ------------------------------------------------------------------------ Portfolio Gallery [2] is a great plugin for adding specialized portfolio gallery, video portfolio gallery of just a gallery with single images.A Cross-Site Scripting vulnerability was found in the Huge IT Portfolio 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. ------------------------------------------------------------------------ Details ------------------------------------------------------------------------ A Reflected Cross-Site Scripting vulnerability exists in the Huge IT Portfolio Gallery WordPress plugin. This vulnerability allows an attacker to perform any action with the privileges of the admin user. The affected code is not protected with an anti-Cross-Site Request Forgery token. Consequently, it can be exploited by luring the target user into clicking a specially crafted link or visiting a malicious website (or advertisement). The vulnerability exists in the file .portfolio-gallery/admin/portfolios_views.php (line 804): The vulnerability can be exploited using a specially crafted ajaxurl URL parameter. In order to exploit this issue the target user must click a specially crafted link or visit a malicious website (or advertisement). ------------------------------------------------------------------------ Proof of concept ------------------------------------------------------------------------ http:///wp-admin/admin.php?page=portfolios_huge_it_portfolio&task=portfolio_video&id=%22%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3E ------------------------------------------------------------------------ References ------------------------------------------------------------------------ [1] https://sumofpwn.nl/advisory/2016/cross_site_scripting_in_huge_it_portfolio_gallery_wordpress_plugin.html [2] https://wordpress.org/plugins/portfolio-gallery/ [3] https://downloads.wordpress.org/plugin/portfolio-gallery.2.1.11.zip