What is Cross-Site Scripting (XSS), and how does it affec…

What is Cross-Site Scripting (XSS), and how does it affec…

PROMPT TEXT

What is Cross-Site Scripting (XSS), and how does it affect web applications? Explain the different types of XSS attacks (stored, reflected, and DOM-based), how they are executed, and the strategies for preventing XSS, such as input sanitization, output encoding, and Content Security Policies (CSP).