Recent Survey on Cross Site Scripting (XSS) Attacks

Cross-site scripting is a type of attack that occurs when one website is exploited to deliver malicious code to other websites. This can also happen when an attacker tricks a user into clicking on a link, which delivers malicious code to their machine. This article will teach you how to protect your website against this kind of cyber attack [1-2].

When a computer security flaw exists that allows hackers to inject malicious content into your website, this is known as cross-site scripting (XSS). Even though XSS can be found on ordinary websites, it is more frequently encountered on sites where users have the ability to upload or edit content[3-4].

XSS is a computer security problem that can allow an attacker to inject client-side scripts into the pages viewed by other users. XSS is most commonly seen with web browsers, but can occur in other applications as well[5].

Types of Cross Site Scripting Attacks

The primary goal of carrying out an XSS attack is to steal the identity of another individual. As previously stated, cookies, session tokens, and other similar technologies may be used. XSS can also be used to display fictitious pages or forms for the victim to fill out. This attack, on the other hand, can be carried out in a variety of ways[6].

Figure 1 depicts the type of attacks, which are Reflected, Stored and DOM form.

Figure 1: Types of XSS Attacks

How to protect a website from cross-site scripting (XSS) attacks

Cross-site scripting, also known as XSS, is an attack on a website that allows hackers to take control of your computer by using your browser to execute scripts on it. This is accomplished by taking advantage of a vulnerability in the application and injecting code into the site’s response to the vulnerability. Despite the fact that this type of attack is considered to be one of the most dangerous and risky, it is still recommended that a prevention strategy be developed. Because of the widespread use of this attack, there are a plethora of methods for preventing it. Most commonly used are Data validation, Filtering and Escaping[7].

Cross site scripting (XSS) is a type of computer security vulnerability that allows an attacker to inject client-side script into the user’s browser session. The vulnerability is due to the fact that some input fields on websites are not properly filtered or escaped when they are sent to the browser[8].

Cross site scripting (XSS) is a web vulnerability that occurs when an author inserts untrusted data in an authenticated HTTP request [9-11]. This can lead to the theft of user credentials, manipulation of trusted content, or any other adverse consequences. XSS vulnerabilities are often exploited by attackers to compromise websites and other applications, making it important to detect and protect against them.


Cross Site scripting (XSS) is a security vulnerability that enables attackers to gain access to the information of one server by exploiting the transfer of data between two different servers. It allows hackers to insert scripts that are executed when a user visits a malicious website.


[1] Ntantogian, C.,et al. (2021). NodeXP: NOde. js server-side JavaScript injection vulnerability DEtection and eXPloitation. Journal of Information Security and Applications58, 102752.

[2] Chaudhary, P., et al. (2016, March). Cross-site scripting (XSS) worms in Online Social Network (OSN): Taxonomy and defensive mechanisms. In 2016 3rd International Conference on Computing for Sustainable Global Development (INDIACom) (pp. 2131-2136). IEEE.

[3] Gupta, S., et al. (2015, May). PHP-sensor: a prototype method to discover workflow violation and XSS vulnerabilities in PHP web applications. In Proceedings of the 12th ACM International Conference on Computing Frontiers (pp. 1-8).

[4] Zhang, X., Zhou, Y., Pei, S., Zhuge, J., & Chen, J. (2020). Adversarial examples detection for XSS attacks based on generative adversarial networks. IEEE Access8, 10989-10996.

[5] Gupta, S., et al. (2016). Automated discovery of JavaScript code injection attacks in PHP web applications. Procedia Computer Science78, 82-87.

[6] Gupta, S., et al. (2016). XSS-SAFE: a server-side approach to detect and mitigate cross-site scripting (XSS) attacks in JavaScript code. Arabian Journal for Science and Engineering41(3), 897-920.

[7] Ramya, et al. A Comprehensive End-to-End framework for Detection and Prevention of Cross Site Scripting Attack.

[8] Gupta, B. B., et al. (2015). Cross-site scripting (XSS) abuse and defense: exploitation on several testing bed environments and its defense. Journal of Information Privacy and Security11(2), 118-136.

[9] Gupta, S., et al. (2017). Detection, avoidance, and attack pattern mechanisms in modern web application vulnerabilities: present and future challenges. International Journal of Cloud Applications and Computing (IJCAC)7(3), 1-43.

[10] Sarmah, U., Bhattacharyya, D. K., & Kalita, J. K. (2018). A survey of detection methods for XSS attacks. Journal of Network and Computer Applications118, 113-143.

[11] Gupta, S., & Gupta, B. B. (2016). JS‐SAN: defense mechanism for HTML5‐based web applications against JavaScript code injection vulnerabilities. Security and Communication Networks9(11), 1477-1495.

42640cookie-checkRecent Survey on Cross Site Scripting (XSS) Attacks
Share this:

Leave a Reply

Your email address will not be published.