Cross-site scripting (XSS)
Cross-site scripting (XSS) is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by users. This can happen when a website does not properly validate or sanitize user input, enabling the attacker to execute harmful code in the context of another user's browser.
There are different types of XSS, including reflected XSS, stored XSS, and DOM-based XSS. Each type exploits different weaknesses in web applications, potentially leading to unauthorized access to sensitive information, session hijacking, or defacement of websites. Proper coding practices and security measures can help prevent XSS attacks.