« Previous
Next »
XSS HOME
Welcome to the iwantcoding.com XSS Tutorial. Cross-site scripting is the most common, most-defeated web vulnerability of the last 20 years. This track teaches it from the defender’s seat: how it happens, why it’s dangerous, and the exact patches that stop it.
What this tutorial covers
| Chapter | You will learn |
|---|---|
| XSS | How it works, reflected, stored, DOM-based, mutation, impact, a safe demo lab. |
| Prevention | Output encoding, context-aware escaping, sanitisation, framework auto-escape, DOMPurify, Trusted Types, CSP, HttpOnly / SameSite cookies. |
| Detection & Hardening | Code review, lint rules, SAST, DAST, CSP reporting, WAF / RASP. |
| Examples | Cheatsheet, runnable snippets, quiz, exercises, bootcamp, certificate. |
Who this is for
- Frontend devs shipping anything with user-controlled HTML.
- Reviewers auditing code for OWASP A03.
- Security engineers writing CSP policies.
How to use this tutorial: read the chapter, run the example with Try it Yourself », do the exercise, then take the quiz at the bottom. Hit Mark complete when you're done — the sidebar will track your progress.
Example
Example
// XSS in one slide: // VULNERABLE results.innerHTML = 'You searched for: ' + query; // SAFE results.textContent = 'You searched for: ' + query;Try it Yourself »
« Previous
Next »
Discussion
Loading…