If WP Customer Reviews is enabled on a page, an unauthenticated attacker can exploit XSS via review form's parameters:
- Reviewer Name
- Review Title
On the other hand, an authenticated low-privileged user (Author) can exploit XSS via Edit Post's form parameters:
If review format is "Business":
- Business Name
- Street Address 1
- Street Address 2
- City / Locality
If review format is "Product":
- Product Name
- Manufacturer/Brand of Product
The script stored is executed for all admin users of the website when accessing review detail page.
1. Download and install "WP Customer Reviews 3.4.2" from https://wordpress.org/plugins/wp-customer-reviews/
2. From dashboard, admin go to arbitrary post, edit and enable "Enable WP Customer Reviews for this page".
3. As an unauthenticated attacker, go to the page that enabled review form and enter XSS vector to "Reviewer Name", "Website", "Review Title":
" autofocus onfocus='alert(document.domain)'>
5. An authenticated low-privileged user (Author) can do the same with Edit Post form, enter XSS vector on product, business fields.
--- PoC Request
POST /wp-admin/admin-ajax.php?action=wpcr3-ajax HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8