DOM XSS via location hash
URL / fragmentseverity: medium
#<img src=x onerror=alert('XSS')>- Context
- URL fragment read by client JavaScript.
- What it needs
- Client code writes location.hash into innerHTML or a similar sink.
- Why it works
- The fragment never reaches the server, so it executes purely in the browser.