Skip to content

In-depth lesson · Mutation XSS and sanitiser bypass

Bypasses and variations

Every point the Mutation XSS and sanitiser bypass reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 8 of 8
  1. Rely on a parsing behaviour change in a specific browser version to get script past a sanitiser that was written for older parsing.

    Seen in 1 report
  2. Use full-width or small-form Unicode characters that the back end converts to angle brackets, and chain MathML, xml:base and fake URLs to get past the filters.

    Seen in 1 report
  3. After the fix wrapped the input in an extra CDATA block, repeat the attack with the closing sequence doubled to escape the added wrapper.

    Seen in 1 report
  4. Use a path traversal after an allowed prefix to get past a startsWith allow-list on the use element's href.

    Seen in 1 report
  5. Use the data-disable-with attribute, which the sanitiser does not strip and which Rails-ujs turns into HTML on click, to get script or a form submission past the directive.

    Seen in 1 report
  6. Inject a meta refresh tag pointing at a data URL containing script and check whether Gmail's CSP stops it from running.

    Seen in 1 report
  7. Insert a newline in the DOCTYPE so the check that marks files unsafe fails to match and the file is served with inline disposition and a .xhtml filename.

    Seen in 1 report
  8. After the fix, use an unblocked event handler and obfuscated strings to get past the denylist filter on the same feature.

    Seen in 1 report