SpinTheMic
Pro

Explain it in 60 seconds

DOM-based XSS sources and sinks

Frontend Engineering · Frontend System Design · Intermediate

What are DOM-based XSS sources and sinks, and how do you avoid them?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Sources: location, URL params, postMessage, storage.
  • Sinks: innerHTML, eval, document.write, href javascript:.
  • Never pass untrusted data to sinks.
  • Sanitise or use safe APIs (textContent).
  • Trusted Types enforce.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics