Easy Modal <= 2.0.17 - Authenticated SQL Injection



Description
This can only be exploited by a user who already has access to the admin with a valid nonce.

During the security analysis, ThunderScan discovered SQL injection
vulnerabilities in the Easy Modal WordPress Plugin.

The easiest way to reproduce the vulnerability is to visit the
provided URL while being logged in as administrator or another user
that is authorized to access the plugin settings page. Users that do
not have full administrative privileges could abuse the database
access the vulnerability provides to either escalate their privileges
or obtain and modify database contents they were not supposed to be
able to.

The nonce token is required as the URL parameter. Token value is not
unique for each request, nor per each URL, so if the attacker manages
to obtain a valid token value, the module could be exposed to attack
vectors such as Cross Site request forgery (CSRF).
Proof of Concept
http://vulnerablesite.com/wp-admin/admin.php?page=easy-modal&action=delete&id%5B0%5D=4%20AND%20SLEEP(5)&easy-modal_nonce=xxx

http://vulnerablesite.com/wp-admin/admin.php?easy-modal_nonce=xxx&_wp_http_referer=%2Fvulnerablesite.com%2Fwp-admin%2Fadmin.php%3Fpage%3Deasy-modal%26status%3Dtrash&page=easy-modal&action=untrash&paged=1&id[]=2)%20AND%20SLEEP(10)--%20ZpVQ&action2=-1

Affects Plugin

fixed in version 2.1.0

References

CVE 2017-12946
CVE 2017-12947
URL http://www.defensecode.com/advisories.php
URL https://plugins.trac.wordpress.org/changeset/1636540/easy-modal

Classification

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

Miscellaneous

Submitter Neven Biruski
Submitter Website http://www.defensecode.com
Submitter Twitter DefenseCode
Views 5032
Verified No
WPVDB ID 8881

Timeline

Publicly Published 2017-08-07 (about 2 years ago)
Added 2017-08-07 (about 2 years ago)
Last Updated 2019-08-21 (2 months ago)

Our Other Services

Online WordPress Vulnerability Scanner WPScan WordPress Security Plugin