🔐 What is Cross-Site Scripting (XSS)?

🌐 How XSS Works

🧪 Example Attack Flow

  1. Attacker sends a malicious link to the victim (via email, text, etc.).
  2. Victim clicks the link and visits a trusted site.
  3. The script runs in the victim’s browser without their knowledge.
  4. Private data (e.g., session ID, cookies) is sent to the attacker silently.

🧩 Types of XSS Attacks

1. Non-Persistent (Reflected) XSS

2. Persistent (Stored) XSS

🧾 Real-World Case: Subaru Vulnerability (2017)

🛡️ XSS Prevention & Protection

For Users:

For Developers: