Cross-site Scripting (XSS) - Reflected in shannah/xataface

Valid

Reported on

Oct 1st 2021


Description

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. https://github.com/shannah/xataface is vulnerable to XSS as shown below:

Proof of concept

Vuln variable: POST variables , for example: -dbuser
Snippet:

        $res = $this->test_db_access($_REQUEST['-dbname'], $_REQUEST['-dbuser'], $_REQUEST['-dbpass']);
        if ( PEAR::isError($res) ){
            $msg = array(
                'success' => false,
                'message' => $res->getMessage()
                );

Go to http://localhost/xataface-master/installer.php
Insert db credentials
Select Create application for existing database
Select any database
Under step2, insert into -dbuser the following:

user'</div><img src="x" onerror=alert`xss`>

Observe the XSS

Impact

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 created a GitHub Issue asking the maintainers to create a SECURITY.md 8 months ago
Z-Old
8 months ago

Admin


Hey hitisec, I've emailed the maintainer for you.

We have contacted a member of the shannah/xataface team and are waiting to hear back 8 months ago
shannah
8 months ago

Maintainer


This report neglects to mention the fact that this file is disabled by default. I.e. if you follow the steps described, you just see the message "The installer is currently disabled. To enable it, please rename the 'installer.disabled' file to 'installer.enabled'. You can find this file inside the root xataface directory."

shannah
8 months ago

Maintainer


Fixed https://github.com/shannah/xataface/commit/94143a4299e386f33bf582139cd4702571d93bde https://github.com/shannah/xataface/commit/d486a014570f7f4e01c0e5618e3826bed87ad5bb

While this XSS vulnerability is valid, it is unlikely this affects anyone because:

  1. The installer is disabled by default, and must be explicitly enabled to even access this file.
  2. The user requires a root/admin password for the mysql database in order to access this file, which would limit access to trusted users only.
We have sent a third and final follow up to the shannah/xataface team. This report is now considered stale. 7 months ago
hitisec
a month ago

Researcher


Thanks, can you validate the report on this platform if you agree with it? Regards

Jamie Slome modified the Severity from Medium to Low a month ago
The researcher has received a minor penalty to their credibility for miscalculating the severity: -1
Jamie Slome validated this vulnerability a month ago
hitisec has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
Jamie Slome confirmed that a fix has been merged on 94143a a month ago
The fix bounty has been dropped
to join this conversation