Cross-site Scripting (XSS) in Search Fuction with filter in neorazorx/facturascripts
Reported on
May 10th 2022
Description
The is an XSS could be trigger via search function in number filter.
Cross-site Scripting (XSS) refers to client-side code injection attack wherein an attacker can execute malicious scripts into a legitimate website or web application. XSS occurs when a web application makes use of unvalidated or unencoded user input within the output it generates.
Proof of Concept
1.Login and go to Accounting -> Accounting accounts -> Click on Filters.
2.Enter payload 1'"><script>alert(origin)</script>
on any number filter.
3.Click on Search, script will escape via value
attribute of that filter and then XSS will be triggered.
Image
Impact
1.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.
2.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.