- All Courses
- Practical Web Security
- Common Web Vulnerabilities
- Cross-site scripting (XSS)
Cross-site scripting (XSS)
XSS is attacker-controlled content executing as script in your page. Contextual output encoding is the fix; blocklists are not.
- 19m
- Intermediate

Video by Hussein Nasser · YouTube
Check your understanding
3 questions. Unlocks when you finish the video.
Overview
What this lesson covers
- Tell stored, reflected, and DOM-based XSS apart
- Encode output for the context it lands in
- Constrain script sources with a content security policy
This lesson sits in Common Web Vulnerabilities, part of Practical Web Security. It assumes what came before it and leads directly into the next lesson in the module.
In this lesson you will:
- Tell stored, reflected, and DOM-based XSS apart
- Encode output for the context it lands in
- Constrain script sources with a content security policy
Resources
Your notes will live here
Note taking is not available yet. Nothing you type would be saved, so the tab stays read-only for now.