Automattic · Report #507139
DOM based XSS in the WooCommerce plugin
Validstatus
mediumseverity
37upvotes
5 May 2019disclosed
How it was found
I have found a stored DOM based XSS in the order page at WooCommerce 3.5.6.
The Data input from HTML element name _shipping_state and _billing_state in order page outputs data without escaping.When the victim read the page containing the payload, it executes the script.
Steps to reproduce
- From a Wordpress admin menu, naavigate to WooCommerce page.
- Click to
Add order(Or select to the exist order data, navigate to edit page.) - Click to pencil icon of
BillingorShippingitems, and expand input form. - Select to
Select a country...by Country item. - Input following value in State / Country item.
"><img src=/ onerror="alert(location.host)"
- Click Create button.(If navigated from the exist order, click update.)
- Navigate to edit page, after then an alert displayed. See also attached screenshot.
The security impact is the same as any typical XSS.
Impact
The security impact is the same as any typical XSS.