nZEDb Cross Site Scripting

nZEDb version suffers from a cross site scripting vulnerability.

MD5 | 5a4e3d71dd285a5fe67b09b6b4d21c70

# Exploit Title: nZEDb v0.7.3.3 - Reflected XSS
# Date: August 7, 2017
# Software Link:
# Exploit Author: Kushal Jaisingh
# Contact:
# Category: WebApps, XSS

1. Description

Reflected XSS is possible in nZEDb due to insufficient input sanitization through URL tampering. By default, when a user attempts to navigate to a page which does not exist in nZEDb, a non-static 404 page will be displayed which echos back the URL entered by the user. Upon further inspection of viewing the page source, special characters such as <> are echoed back without being properly encoded, thus enabling the possibility for XSS.

2. Proof of Concept

The following URL will popup a javascript window (replace with your own host running nZEDb). The URL was generated by appending the URL encoded equivalent of /kushal=<img src=x onerror=alert('openbugbounty')> to the end of the parent URL of the site running nZEDb. In this example the string 'kushal=' was used to request a page which does not exist in our nZEDb site, however, any random string will suffice as long as the page does not exist.'openbugbounty')%3E

3. Solution:

To remediate against such vulnerabilities, a static 404 page should be configured which does not display back any input provided by the user. All user input should be considered untrusted by default. This includes but is not limited to input via URL tampering as well.

Related Posts