+---------------------------------------------------------------------------------------------------------------------------------------------------+ # Exploit Title : Wordpress 3.3.1 Multiple CSRF Vulnerabilities # Date : 19-03-2012 # Author : Ivano Binetti (http://www.ivanobinetti.com) # Software link : http://wordpress.org/wordpress-3.3.1.zip # Vendor site : http://wordpress.org # Version : 3.3.1 (and lower). Probably also version 3.3.2 is affected. # Tested on : Debian Squeeze (6.0) # Original Advisory : http://www.webapp-security.com/2012/04/wordpress-3-3-1-multiple-csrf-vulnerabilities/ # CVE : CVE-2012-1936 # OSVDB ID : 81588 # Bugtraq ID : 53280 +---------------------------------------------------------------------------------------------------------------------------------------------------+ Summary 1)Introduction 2)Vulnerabilities Description 2.1 Multiple CSRF 3)Exploit 3.1 CSRF (Change Post Title) 3.2 CSRF (Add Admin) +---------------------------------------------------------------------------------------------------------------------------------------------------+ 1)Introduction WordPress "is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time." 2)Vulnerability Description 2.1 Multiple CSRF Wordpress 3.3.1 suffers from multiple CSRF vulnerabilities which allow an attacker to change post title, add administrators/users, delete administrators/users, approve and unapprove comment, delete comment, change background image, insert custom header image, change site title, change administrator's email, change Wordpress Address, change Site Address, when an authenticated user/admin browses a special crafted web page. May be other parameters can be modified. This vulnerability is caused by a security flaw in anti-CSRF token (_wpnonce, _wpnonce_create-user, _ajax_nonce, _wpnonce-custom-background-upload, _wpnonce-custom-header-upload) generation. For some operations (see below) above specified anti-CSRF tokens are not associated with the current user session (as Owasp recommends) but are the are valid for all operations (for a specific administrator/user) within 12 hour. The above described vulnerability allows an attacker - who has sniffed anti-CSRF token - to have 12 hour to perform a CSRF attack. For Owasp recommendation about anti-CSRF token, you can read the following document: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet#General_Recommendation:_Synchronizer_Token_Pattern This problem affects the following operations: - Add Admin/User - Delete Admin/User - Approve comment - Unapprove comment - Delete comment - Change background image - Insert custom header image - Change site title - Change administrator's email - Change Wordpress Address - Change Site Address Other operations (like insert a new post) are not affected by this CSRF vulnerability. In this Advisory I will only demonstrate how to change post title and how to add a new administrator account. 3)Exploit 3.1 CSRF (Change Post Title)

CSRF Exploit to change post title

Note: this exploit simulate changing of post title using "Quick Edit" function 3.2 CSRF (Add Admin)

CSRF Exploit to add Administrator