A cross-site scripting (XSS) attack can cause arbitrary code (JavaScript) to run in a userโs browser while the browser is connected to a trusted web site. The application targets yourย users and not the application itself, but it uses your application as the vehicle for the attack. XSS payload was executed when the user loads a malicious link generated using the ajax call back in Greenmart autocomplete search.