# Exploit Title: WordPress Plugin Motopress Hotel Booking Lite 4.2.4 - SQL Injection
# Date: 2022-04-11
# Exploit Author: Mohsen Dehghani (aka 0xProfessional)
# Vendor Homepage: https://motopress.com/
# Software Link: https://downloads.wordpress.org/plugin/motopress-hotel-booking-lite.4.2.4.zip
# Version: 4.2.4
# Tested on: Windows/XAMPP
###########################################################################
PoC:
Vulnerable File:sync-urls-repository.php
public function insertUrls($roomId, $urls)
{
global $wpdb;
if (empty($urls)) {
return;
}
$urls = $this->prepareUrls($urls);
$values = array();
foreach ($urls as $syncId => $url) {
$values[] = $wpdb->prepare("(%d, %s, %s)", $roomId, $syncId, $url);
}
$sql = "INSERT INTO {$this->tableName} (room_id, sync_id, calendar_url)"
. " VALUES " . implode(', ', $values);
$wpdb->query($sql);
Vulnerable Parameter:
room_id=SQL Injection
sync_id=SQL InjectionData
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation