Sobes.tech
Senior

What is an XSS attack? What types are there?

sobes.tech AI

Answer from AI

XSS (Cross-Site Scripting) is a web application vulnerability where an attacker injects malicious scripts into pages viewed by other users.

Types of XSS:

  • Stored XSS (Persistent): malicious code is stored on the server (e.g., in a database) and displayed to all users.
  • Reflected XSS: the script is transmitted via URL or form and immediately reflected in the server's response.
  • DOM-based XSS: the vulnerability arises due to improper handling of data on the client side (in JavaScript), without server involvement.

Protection methods include escaping and validating input data, Content Security Policy (CSP), and secure DOM manipulation techniques.

What is an XSS attack? What types are there? — Frontend - sobes.tech