LESSON 2.1

Cross-site scripting (XSS)

18:32·11,213 learners
Alina CostaAlina Costa
Next lesson

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

XSS is attacker-controlled content executing as script in your page. Contextual output encoding is the fix; blocklists are not.

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.

UP NEXT

2.2 · SQL injection

04:14

Practical Web Security

25%

Every lesson, searchable to the second.

© 2026 BIBLION

PRIVACY · TERMS · CONTACT