------------------------------------------------------------------------ Cross-Site Request Forgery & Cross-Site Scripting in Contact Form Manager WordPress Plugin ------------------------------------------------------------------------ Edwin Molenaar [2], July 2016 ------------------------------------------------------------------------ Abstract ------------------------------------------------------------------------ It was discovered that Contact Form Manager does not protect against Cross-Site Request Forgery. This allows an attacker to change arbitrary Contact Form Manager settings. In addtion, the plugin also fails to apply proper output encoding, rendering it vulnerable to stored Cross-Site Scripting. ------------------------------------------------------------------------ OVE ID ------------------------------------------------------------------------ OVE-20160718-0003 ------------------------------------------------------------------------ Tested versions ------------------------------------------------------------------------ These issues were successfully tested on Contact Form Manager [3] WordPress Plugin version ------------------------------------------------------------------------ Fix ------------------------------------------------------------------------ There is currently no fix available. ------------------------------------------------------------------------ Introduction ------------------------------------------------------------------------ The Contact Form Manager [3] WordPress Plugin lets users create and manage multiple customized contact forms for their website. It supports a wide range of contact form elements such as text field, email field, textarea, dropdown list, radio button, checkbox, date picker, captcha, and file uploader. It was discovered that Contact Form Manager does not protect against Cross-Site Request Forgery. This allows an attacker to change arbitrary Contact Form Manager settings. In addtion, the plugin also fails to apply proper output encoding, rendering it vulnerable to stored Cross-Site Scripting. ------------------------------------------------------------------------ Details ------------------------------------------------------------------------ These issues exists, because the plugin lacks an anti-CSRF token. Also improper filtering/output encoding is done on $_POST parameters. These issues are present in the filed contact-form-manager/admin/add_smtp.php and contact-form-manager/admin/form-edit.php. The username input field on the XYZ Contact > SMTP Settings is vulnerable for Cross-Site Scripting, as wel as the Contact Form Name input field on the XYZ Contact > Contact Form page. SMTP Settings URL: http:///wp-admin/admin.php?page=contact-form-manager-manage-smtp Contact Forms URL: http:///wp-admin/admin.php?page=contact-form-manager-managecontactformsp ------------------------------------------------------------------------ Proof of concept ------------------------------------------------------------------------
xyz_cfm_SmtpAuthentication
xyz_cfm_SmtpEmailAddress
xyz_cfm_SmtpHostName
xyz_cfm_SmtpPassword
xyz_cfm_SmtpPortNumber
xyz_cfm_SmtpSecuirity
------------------------------------------------------------------------ References ------------------------------------------------------------------------ [1] https://sumofpwn.nl/advisory/2016/cross_site_request_forgery___cross_site_scripting_in_contact_form_manager_wordpress_plugin.html [2] https://www.linkedin.com/in/edwinmolenaar [3] https://wordpress.org/plugins/contact-form-manager/