XSS attacks involve malicious scripts that have been injected into a trusted site.
XSS attacks occur when an attacker exploits a given web application that is allowing unventilated input to be sent into the site generally in the form of browser-based scripts, which are then executed by a different user of the website.
There are many forms that attackers can exploit, based on validated or unencoded information provided to websites.
At the core of this issue is expecting a user to trust the site's information that is being sent. The end user's browser has no way to know that the script should not be trusted because there has been an implicit trust of the website they're browsing. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by...