{"id":23377,"date":"2022-04-19T19:29:54","date_gmt":"2022-04-19T15:29:54","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/166771\/wpmotopresshbl424-sql.txt"},"modified":"2022-05-09T07:51:44","modified_gmt":"2022-05-09T03:21:44","slug":"wordpress-motopress-hotel-booking-lite-4-2-4-sql-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/wordpress-motopress-hotel-booking-lite-4-2-4-sql-injection\/","title":{"rendered":"WordPress Motopress Hotel Booking Lite 4.2.4 SQL Injection"},"content":{"rendered":"<p dir=\"ltr\"># Exploit Title: WordPress Plugin Motopress Hotel Booking Lite 4.2.4 &#8211; SQL Injection<br \/>\n# Date: 2022-04-11<br \/>\n# Exploit Author: Mohsen Dehghani (aka 0xProfessional)<br \/>\n# Vendor Homepage: https:\/\/motopress.com\/<br \/>\n# Software Link: https:\/\/downloads.wordpress.org\/plugin\/motopress-hotel-booking-lite.4.2.4.zip<br \/>\n# Version: 4.2.4<br \/>\n# Tested on: Windows\/XAMPP<br \/>\n###########################################################################<br \/>\nPoC:<\/p>\n<p dir=\"ltr\">Vulnerable File:sync-urls-repository.php<\/p>\n<p dir=\"ltr\">public function insertUrls($roomId, $urls)<br \/>\n{<br \/>\nglobal $wpdb;<\/p>\n<p dir=\"ltr\">if (empty($urls)) {<br \/>\nreturn;<br \/>\n}<\/p>\n<p dir=\"ltr\">$urls = $this-&gt;prepareUrls($urls);<br \/>\n$values = array();<\/p>\n<p dir=\"ltr\">foreach ($urls as $syncId =&gt; $url) {<br \/>\n$values[] = $wpdb-&gt;prepare(&#8220;(%d, %s, %s)&#8221;, $roomId, $syncId, $url);<br \/>\n}<\/p>\n<p dir=\"ltr\">$sql = &#8220;INSERT INTO {$this-&gt;tableName} (room_id, sync_id, calendar_url)&#8221;<br \/>\n. &#8221; VALUES &#8221; . implode(&#8216;, &#8216;, $values);<\/p>\n<p dir=\"ltr\">$wpdb-&gt;query($sql);<\/p>\n<p dir=\"ltr\">Vulnerable Parameter:<br \/>\nroom_id=SQL Injection<br \/>\nsync_id=SQL Injection<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: WordPress Plugin Motopress Hotel Booking Lite 4.2.4 &#8211; 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-23377","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/23377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=23377"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/23377\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=23377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=23377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=23377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}