Cross-Site Scripting (XSS)

Cyber Security & Ethical Hacking 222 views Nov 05, 2025 1 min read

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
Share this Post
🚀 Want to Test Your Knowledge?

Take quizzes related to this topic and see where you stand!

Start Quiz Now
Back to Tutorials