------------------------------------------------------------------------ Cross-Site Request Forgery in Atahualpa WordPress Theme ------------------------------------------------------------------------ Spyros Gasteratos, July 2016 ------------------------------------------------------------------------ Abstract ------------------------------------------------------------------------ A Cross Site Request Forgery vulnerability exists in the Atahualpa Wordpress theme which allows attackers to legitimate users into performing unintended actions on the Atahualpa theme configuration page. ------------------------------------------------------------------------ OVE ID ------------------------------------------------------------------------ OVE-20160724-0003 ------------------------------------------------------------------------ Tested versions ------------------------------------------------------------------------ This issue was successfully tested on Atahualpa WordPress Theme [2] WordPress Theme. ------------------------------------------------------------------------ Fix ------------------------------------------------------------------------ There is currently no fix available. ------------------------------------------------------------------------ Introduction ------------------------------------------------------------------------ Atahualpa v3.7.24 has it's own Theme Options page where administrators can set various options including changing the page's appearance or injecting Javascript. The save button of this page doesn't include a CSRF nonce token which gives attacker the ability to trick Wordpress administrators into setting settings the attacker controls. ------------------------------------------------------------------------ Details ------------------------------------------------------------------------ The theme's save configuration settings form doesn't include a Wordpress CSRF nonce and consequently the script servicing the request doesn't check for one. This allows the form to be submitted with preloaded values as long as the browser sends a valid login cookie. This allows attackers who lure legitimate users with an active Wordpress session to an irrelevant website which submits the "Save Settings" request to the user's Wordpress install. Since the request is towards a domain for which the browser has cookies the legitimate cookies will be submitted and the request will succeed. The theme's configuration panel allows setting a variety of configuration options including changes in the website's appearance as well as appending Javascript in several areas. Attackers can use this vulnerability to take over a Wordpress website. ------------------------------------------------------------------------ Proof of concept ------------------------------------------------------------------------ Install the theme, login as admin and load the following csrf poc in the same browser on another tab, when clicking "Submit" it will modify the page footer.
------------------------------------------------------------------------ References ------------------------------------------------------------------------ [1] https://sumofpwn.nl/advisory/2016/cross_site_request_forgery_in_atahualpa_wordpress_theme.html [2] https://wordpress.org/themes/atahualpa/