------------------------------------------------------------------------ Cross-Site Request Forgery vulnerability in Email Users WordPress Plugin ------------------------------------------------------------------------ Julien Rentrop, July 2016 ------------------------------------------------------------------------ Abstract ------------------------------------------------------------------------ It was found that the Email Users WordPress Plugin is vulnerable to Cross-Site Request Forgery. By using this issue it is possible for an attacker to send arbitrary (bulk) email messages to any address. In order to exploit this issue, an attacker needs to lure a target user into clicking a specially crafted link or visiting a malicious website (or advertisement). ------------------------------------------------------------------------ OVE ID ------------------------------------------------------------------------ OVE-20160718-0001 ------------------------------------------------------------------------ Tested versions ------------------------------------------------------------------------ This issue was successfully tested on Email Users [2] WordPress Plugin version 4.8.3. ------------------------------------------------------------------------ Fix ------------------------------------------------------------------------ This issue is resolved in Email Users version 4.8.4 [3]. ------------------------------------------------------------------------ Introduction ------------------------------------------------------------------------ The Email Users [2] WordPress Plugin allows site editors to send an e-mail to the blog users. It was found that the Email Users WordPress Plugin is vulnerable to Cross-Site Request Forgery. By using this issue it is possible for an attacker to send arbitrary (bulk) email messages to any address. ------------------------------------------------------------------------ Details ------------------------------------------------------------------------ The email users admin page has admin pages for; - Send to individual user(s) - Send to group of users - Settings These functions can all be triggered using a CSRF attack. These functions can get executed when a logged on admin user gets triggered in to opening a page the attacker controls. Especially the option to send mails to groups of users is interesting for an attacker. In order to exploit this issue, an attacker needs to lure a target user into clicking a specially crafted link or visiting a malicious website (or advertisement). ------------------------------------------------------------------------ Proof of concept ------------------------------------------------------------------------ As you can see in all messages there is not a WordPress nonce (or other kind of CSRF token) present. This makes the CSRF possible. The cookie values should be replaced by the values of a logged on admin user. Most unneeded headers/params are stripped in the examples. ------------------------------------------------------------------------ Send to individual user(s) ------------------------------------------------------------------------ See below the example message. The attacker can fill in the various fields such as body of the mail. For verification check if the response contains "
Email sent to" (followed by nr of users). As user id's are
just sequential numbers an attacker can send a list of id's. The
"%5B%5D" part is url encoded form of [], so it's also possible to send
in a list of user id's at once.
POST /wp-admin/admin.php?page=mailusers-send-to-user-page HTTP/1.1
Host: