CVE-2014-9178 : Detail

CVE-2014-9178

SQL Injection
A03-Injection
0.15%V3
Network
2014-12-02
15h00 +00:00
2018-10-09
16h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Multiple SQL injection vulnerabilities in classes/ajax.php in the Smarty Pants Plugins SP Project & Document Manager plugin (sp-client-document-manager) 2.4.1 and earlier for WordPress allow remote attackers to execute arbitrary SQL commands via the (1) vendor_email[] parameter in the email_vendor function or id parameter in the (2) download_project, (3) download_archive, or (4) remove_cat function.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

Metrics

Metrics Score Severity CVSS Vector Source
V2 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 35313

Publication date : 2014-11-20 23h00 +00:00
Author : ITAS Team
EDB Verified : Yes

Vulnerability title: Multi SQL Injection in SP Client Document Manager plugin CVE: N/A Vendor: http://smartypantsplugins.com Plugin: SP Client Document Manager Download link: https://wordpress.org/plugins/sp-client-document-manager/ Affected version: version 2.4.1 and previous version Google dork: inurl:wp-content/plugins/sp-client-document-manager Fixed version: N/A Reported by: Dang Quoc Thai - [email protected] - Credits to ITAS Team - www.itas.vn Timeline: + 10/30/2014: Notify to vendor - vendor does not response + 11/08/2014: Notify to vendor - Vendor blocks IPs from Viet Nam + 11/05/2014: Notify to vendor - vendor does not response + 11/20/2014: Public information Details: The Blind SQL injection vulnerability has been found and confirmed within the software as an anonymous user. A successful attack could allow an anonymous attacker to access information such as username and password hashes that are stored in the database. The following URL and parameter has been confirmed to suffer from blind SQL injection: Link 1: POST /wordpress/wp-content/plugins/sp-client-document-manager/ajax.php?function=email-vendor HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 Accept: text/html, */*; q=0.01 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate X-Requested-With: XMLHttpRequest Referer: http://server/wordpress/?page_id=16 Cookie: wordpress_cbbb3ecca6306be6e41d05424d417f7b=test1%7C1414550777%7CxKIQf1812x9lfyhuFgNQQhmDtojDdEnDTfLisVHwnJ6%7Cc493b6c21a4a1916e2bc6076600939af5276b6feb09d06ecc043c37bd92a0748; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_cbbb3ecca6306be6e41d05424d417f7b=test1%7C1414550777%7CxKIQf1812x9lfyhuFgNQQhmDtojDdEnDTfLisVHwnJ6%7C7995fe13b1bbe0761cb05258e4e13b20b27cc9cedf3bc337440672353309e8a3; bp-activity-oldestpage=1 Connection: keep-alive Content-Length: 33 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 vendor_email[]=<SQL Injection> Vulnerable file:/wp-content/plugins/sp-client-document-manager/classes/ajax.php Vulnerable code: (Line: 1516 -> 1530) function email_vendor() { global $wpdb, $current_user; if (count($_POST['vendor_email']) == 0) { echo '<p style="color:red;font-weight:bold">' . __("Please select at least one file!", "sp-cdm") . '</p>'; } else { $files = implode(",", $_POST['vendor_email']); echo "SELECT * FROM " . $wpdb->prefix . "sp_cu WHERE id IN (" . $files . ")"."\n"; $r = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "sp_cu WHERE id IN (" . $files . ")", ARRAY_A); Link 2: http://server/wordpress/wp-content/plugins/sp-client-document-manager/ajax.php?function=download-project&id=<SQL Injection> GET /wp-content/plugins/sp-client-document-manager/ajax.php?function=download-project&id=<SQL Injection> HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Cookie: PHPSESSID=4f7eca4e8ea50fadba7209e47494f29c Connection: keep-alive Vulnerable file:/wp-content/plugins/sp-client-document-manager/classes/ajax.php Vulnerable code: (Line: 1462 -> 1479) function download_project() { global $wpdb, $current_user; $user_ID = $_GET['id']; $r = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "sp_cu where pid = $user_ID order by date desc", ARRAY_A); $r_project = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "sp_cu_project where id = $user_ID ", ARRAY_A); $return_file = "" . preg_replace('/[^\w\d_ -]/si', '', stripslashes($r_project[0]['name'])) . ".zip"; $zip = new Zip(); $dir = '' . SP_CDM_UPLOADS_DIR . '' . $r_project[0]['uid'] . '/'; $path = '' . SP_CDM_UPLOADS_DIR_URL . '' . $r_project[0]['uid'] . '/'; //@unlink($dir.$return_file); for ($i = 0; $i < count($r); $i++) { $zip->addFile(file_get_contents($dir . $r[$i]['file']), $r[$i]['file'], filectime($dir . $r[$i]['file'])); } $zip->finalize(); // as we are not using getZipData or getZipFile, we need to call finalize ourselves. $zip->setZipFile($dir . $return_file); header("Location: " . $path . $return_file . ""); } Link 3: http://server/wordpress/wp-content/plugins/sp-client-document-manager/ajax.php?function=download-archive&id=<SQL Injection> GET /wp-content/plugins/sp-client-document-manager/ajax.php?function=download-archive&id=<SQL Injection> HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Cookie: PHPSESSID=4f7eca4e8ea50fadba7209e47494f29c Connection: keep-alive Vulnerable file:/wp-content/plugins/sp-client-document-manager/classes/ajax.php Vulnerable code: (Line: 1480 -> 1496) function download_archive() { global $wpdb, $current_user; $user_ID = $_GET['id']; $dir = '' . SP_CDM_UPLOADS_DIR . '' . $user_ID . '/'; $path = '' . SP_CDM_UPLOADS_DIR_URL . '' . $user_ID . '/'; $return_file = "Account.zip"; $zip = new Zip(); $r = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "sp_cu where uid = $user_ID order by date desc", ARRAY_A); //@unlink($dir.$return_file); for ($i = 0; $i < count($r); $i++) { $zip->addFile(file_get_contents($dir . $r[$i]['file']), $r[$i]['file'], filectime($dir . $r[$i]['file'])); } $zip->finalize(); // as we are not using getZipData or getZipFile, we need to call finalize ourselves. $zip->setZipFile($dir . $return_file); header("Location: " . $path . $return_file . ""); } Link 4: http://server/wordpress/wp-content/plugins/sp-client-document-manager/ajax.php?function=remove-category&id=<SQL Injection> GET /wp-content/plugins/sp-client-document-manager/ajax.php?function=remove-category&id=<SQL Injection> HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Cookie: PHPSESSID=4f7eca4e8ea50fadba7209e47494f29c Connection: keep-alive Vulnerable file:/wp-content/plugins/sp-client-document-manager/classes/ajax.php Vulnerable code: (Line: 1480 -> 1496) Vulnerable file:/wp-content/plugins/sp-client-document-manager/classes/ajax.php Vulnerable code: (Line: 368 -> 372) function remove_cat() { global $wpdb, $current_user; $wpdb->query("DELETE FROM " . $wpdb->prefix . "sp_cu_project WHERE id = " . $_REQUEST['id'] . " "); $wpdb->query("DELETE FROM " . $wpdb->prefix . "sp_cu WHERE pid = " . $_REQUEST['id'] . " "); }

Products Mentioned

Configuraton 0

Smartypantsplugins>>Sp_project_\&_document_manager >> Version To (including) 2.4.1

References

http://www.exploit-db.com/exploits/35313
Tags : exploit, x_refsource_EXPLOIT-DB