
PoC of CVE-2025-22352
WordPress plugin
Component name ELEX WooCommerce Advanced Bulk Edit Products, Prices & Attributes
Vulnerable version <= 1.4.8
Component slug elex-bulk-edit-products-prices-attributes-for-woocommerce-basic
Component link https://wordpress.org/plugins/elex-bulk-edit-products-prices-attributes-for-woocommerce-basic/
Vulnerability class A3: Injection
Vulnerability type SQL Injection (Blind SQL Injection)
Shop Manager OR Administrator
The ELEX WooCommerce Advanced Bulk Edit Products, Prices & Attributes plugin is a plugin that supports bulk editing of products.
When bulk editing products in this plugin, targets are selected through filtering, and during this process, an SQL Injection vulnerability occurs when some data transmitted during product filtering requests is directly inserted into SQL queries.
However, the SQL query results cannot be directly verified, and the vulnerability exists as a Blind SQL Injection method where data is extracted through determining whether query results are true or false.
When executing the function ('Preview Filtered Products') requested in the PoC description above, the following packet is generated.

When this packet is requested, the elex_bep_filter_products function in the /wp-content/plugins/elex-bulk-edit-products-prices-attributes-for-woocommerce-basic/includes/elex-ajax-apifunctions.php file is called.
The desired_price value containing the SQL Injection payload from the request data is executed as an SQL query through the following sequence.
The desired_price value containing the SQL Injection payload is directly passed to the query condition clause and assigned to the variable $price_query.
product_title_text,rangeare also directly passed to the query, but since we passed the SQL Injection payload todesired_pricein the PoC, we will only explaindesired_pricehere.
// elex-ajax-apifunctions.php at line 1280
$price_query = " AND meta_key='_regular_price' AND meta_value {$filter_range} {$data_to_filter['desired_price']} ";

After that, the variable $price_query is added to the variable $sql (line 1365, #1), and the variable $sql along with the string AND and variable initialize the variable (line 1379, #2)

Therefore, the request parameter desired_price containing the SQL Injection payload is included in $main_query of the $wpdb->prepare( '%1s', $main_query ) statement. At this point, since the %1s format specifier passes the $main_query value as is, the SQL Injection payload is inserted into the query without escaping, resulting in an SQL Injection vulnerability.
⚠️ The PoC code is implemented to obtain the database name by exploiting the Blind SQL Injection vulnerability using a product manager account.

Next, enter the following command to run the PoC code.
Required modulesrequests
python poc.py

$product_type_condition$main_queryThe variable
$sqlis initialized on line 1257 ofelex-ajax-apifunctions.php.

Finally, the variable $main_query is passed as an argument to the prepare function as shown below to execute a database query.