FlashcardNot attempted
The XSS chain
Recall it before you reveal
Why do people say XSS is the most important browser vulnerability to prevent?
Space to reveal
Show answer & explanation
Once an attacker runs JavaScript on your origin, they:
1. act as the user (call your API with their session) 2. get past client-side checks (hidden buttons, frontend role checks) 3. read anything the page can read (DOM, localStorage, tokens in memory)
HttpOnly cookies and short-lived tokens only limit the damage. They do not stop it. So you prevent XSS first, and use CSP as the backup layer.