Cross-Site Scripting (XSS)

📘 Cyber Security & Ethical Hacking 👁 41 views 📅 Nov 05, 2025
⏱ Estimated reading time: 1 min

XSS is a web vulnerability where attackers inject malicious scripts into web pages viewed by other users.

Key Points:

  • Exploits user input that is not properly validated or escaped

  • Can steal cookies, session tokens, or deface websites

  • Common in comment sections, forms, or search fields

Types of XSS:

  1. Stored XSS – Malicious script stored on the server

  2. Reflected XSS – Script reflected via URL or input

  3. DOM-based XSS – Script executed in client-side code

Prevention:

  • Escape or sanitize user input

  • Use Content Security Policy (CSP)

  • Validate and encode output


🔒 Some advanced sections are available for Registered Members
Register Now

Share this Post


← Back to Tutorials

Popular Competitive Exam Quizzes