2016 m. kovo 1 d., antradienis

WordPress plugin wp-ultimate-exporter SQL injection vulnerability

After reading bugtraq post[1] I noticed additional vulnerability from WordPress
plugin wp-ultimate-exporter[2]. Versions 1.0 and 1.1 are affected of SQL
injection vulnerability without authentication.

1: http://seclists.org/bugtraq/2016/Feb/172
2: https://wordpress.org/plugins/wp-ultimate-exporter/

Parameter: MULTIPART export_type_name ((custom) POST)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause

    Type: AND/OR time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (SELECT)

"""
POST /wp-admin/admin.php?page=wp_ultimate_exporter&step=
exportposttype HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.6.1
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
Connection: close
Content-Type: multipart/form-data; boundary=---------------------------110342333716197608971909825185
Content-Length: 1452

- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="export_type_name"

post
- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="export_custompost_type"

- --Select--
- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="get_data_with_delimiter"

get_data_with_delimiter
- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="post_withdelimiter"

,
- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="othersdelimiter"


- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="postdatefrom"


- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="postdateto"


- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="postwithstatus"

All
- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="postauthor"

0
- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="export_filename"


- -----------------------------110342333716197608971909825185
Content-Disposition: form-data; name="proceed_to_exclusion"

Export
- -----------------------------110342333716197608971909825185--
"""

includes/UltimateExportHelper.php:
 43     public function createCSVHeaders($exportposttype){
 44         global $wpdb;
 45         $Header = array();
 46         $post_type = $exportposttype;
 47
 48         $header_query1 = "SELECT wp.* FROM  $wpdb->posts wp where post_type = '$post_type'";
 49         $header_query2 = "SELECT post_id, meta_key, meta_value FROM  $wpdb->posts wp JOIN $wpdb->postmeta wpm  ON wpm.post_id = wp.ID where wp.post_type = '$post_type' and meta_key NOT IN ('_edit_lock','_edit_last') and meta_key NOT LIKE 'field_%' and meta_key NOT L    IKE '_wp_types%'";
 50         $result_header_query1 = $wpdb->get_results($header_query1);

- --
Henri Salo

Komentarų nėra:

Rašyti komentarą