Cross-site Scripting (XSS) - Stored in helloxz/onenav


Reported on

Feb 14th 2022


Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into websites. An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. is vulnerable to XSS as shown below:

Proof of concept

Vuln variable: $category['name']
Onenav stores user input without filtering and then display it, for example in the add_category method.
POST variables are stored

function add_category($api){
    $token = $_POST['token'];
    $name = $_POST['name'];

And then saved into database:

public function add_category($token,$name,$property = 0,$weight = 0,$description = ''){
        $data = [
            'name'          =>  $name,
            'add_time'      =>  time(),

Next the user input are displayed without filtering:

<div class="mdui-list-item-content category-name"><?php echo $category['name']; ?></div>


Login to onenav and go to add_category section:


In the name field insert the following:


Next go to the onenav root, in this case:


Observe the XSS


Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page.


We are processing your report and will contact the helloxz/onenav team within 24 hours. 2 years ago
We have contacted a member of the helloxz/onenav team and are waiting to hear back 2 years ago
helloxz validated this vulnerability 2 years ago
hitisec has been awarded the disclosure bounty
The fix bounty is now up for grabs
helloxz marked this as fixed in 0.9.13 with commit 17a3e2 2 years ago
The fix bounty has been dropped
to join this conversation