Cross-site scripting enables attackers to inject client-side scripts into web pages viewed by other users.
Cross-site scripting vulnerability may be used by attackers to bypass access Controls such as the same-origin policy.
Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec as of 2007.
The effect may range from a petty nuisance to a significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site's owner.
Content-Security-Policy HTTP Response Header allows web site administrators to control resources the User-agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. This helps guard against Cross-site scripting Attacks.