Skills101
← All practice quizzes

Quiz: XSS

5 questionsNo time limitPass: 60%+10 XP on first pass

How one comment box can run an attacker's JavaScript in every visitor's browser, the three types of XSS, and the fixes — output encoding, safe framework defaults, sanitising rich text and Content Security Policy.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    A malicious comment is saved in the database and runs in every reader's browser. This is:

  2. Question 2

    What is the main fix for XSS?

  3. Question 3

    In React, which is dangerous with user input?

  4. Question 4

    What did html.escape turn the < of the payload into?

  5. Question 5

    Which header acts as a safety net that blocks inline scripts if an XSS bug slips through?