URL encoded GET input cat was set to 1'"()&%<acx><ScRiPt >mkDp(9272)</ScRiPt>
HTTP Request
GET /listproducts.php?cat=1'"()%26%25 HTTP/1.1
Referer: http://testphp.vulnweb.com/
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4512.0 Safari/537.36
Host: testphp.vulnweb.com
Connection: Keep-alive
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.
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.
Remediation
Apply context-dependent encoding and/or validation to user input rendered on a page
Affects
http://testphp.vulnweb.com/listproducts.phpAttack Details
URL encoded GET input cat was set to 1'"()&%<acx><ScRiPt >mkDp(9272)</ScRiPt>HTTP Request
GET /listproducts.php?cat=1'"()%26%25Vulnerability 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.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.
Remediation
Apply context-dependent encoding and/or validation to user input rendered on a pageReferences:
Cross-site Scripting (XSS) Attack - AcunetixTypes of XSS - Acunetix
XSS Filter Evasion Cheat Sheet
Excess XSS, a comprehensive tutorial on cross-site scripting
Cross site scripting