Injection attacks are one cyber attack. Cross-Site Scripting (XSS) attacks are a type of injection attack in which malicious scripts are injected into websites that are normally safe and trusted. An XSS assault takes place when an adversary utilizes an online application in order to deliver harmful code to a different end user. This code often takes the form of a browser-side script. The vulnerabilities that make it possible for these attacks to be successful are quite ubiquitous. These vulnerabilities can arise anyplace that a web application includes input from a user inside the output that it creates without first verifying or encrypting the input.  Three variations of cross-site scripting may be used. Non-persistent Persistent Server side versus DOM-based vulnerabilities