Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

Vulnerability Non Self Reflected XSS #383

Closed Endalaust closed 1 year ago

Endalaust commented 1 year ago

Describe the bug and how to reproduce it:

Reflected XSS attacks, also known as non-persistent attacks, occur when a malicious script is reflected off of a web application to the victim’s browser. The script is activated through a link, which sends a request to a website with a vulnerability that enables execution of malicious scripts.

Payload Used: '"()%26%25<acx><ScRiPt >alert(document.cookie)</ScRiPt>

Replication Steps: Visit URL: https://db.rising-gods.de/?search=the%27%22()%26%25%3Cacx%3E%3CScRiPt%20%3Ealert(document.cookie)%3C/ScRiPt%3E (I pick this domain but it's similar from the other : https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?search=the%27%22()%26%25%3Cacx%3E%3CScRiPt%20%3Ealert(document.cookie)%3C/ScRiPt%3E )

You will see an XSS popup hence vulnerable.

Impact:

Malicious JavaScript has access to all the same objects as the rest of the web page, including access to cookies and local storage, which are often used to store session tokens. If an attacker can obtain a user's session cookie, they can then impersonate that user.

Furthermore, JavaScript can read and make arbitrary modifications to the contents of a page being displayed to a user. Therefore, XSS in conjunction with some clever social engineering opens up a lot of possibilities for an attacker.

Mitigation:

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:

In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.

System: