Skip to content

In-depth lesson · XSS

Bypasses and variations

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

Back to the lesson 1 to 50 of 743
  1. Break out of the surrounding attribute and inject an SVG element with an onload handler.

    Seen in 4 reports
  2. Chain a login CSRF so the victim is signed into the attacker's account and the self-XSS becomes reachable.

    Seen in 3 reports
  3. Encoding tricks such as base64, HTML entities and double URL encoding got payloads past WAFs.

    Seen in 3 reports
  4. The endpoint's Content Security Policy allowed a wildcard script host and lacked a base-uri directive, so injected markup could load attacker-controlled scripts on a mobile JavaScript endpoint.

    Seen in 3 reports
  5. A cross-origin iframe can bypass same-origin policy by opening a javascript: URL in a new window when multiwindow support is disabled.

    Seen in 2 reports
  6. A strict Content-Security-Policy blocked script execution in modern browsers, leaving only HTML injection.

    Seen in 2 reports
  7. Break out of an attribute with a quote and add an autofocus event handler.

    Seen in 2 reports
  8. Bypass a CSP by using a JSONP endpoint on a whitelisted domain whose callback parameter accepts attacker-controlled script.

    Seen in 2 reports
  9. Bypass CSP by loading a script from a third-party script host.

    Seen in 2 reports
  10. Craft injected markup that bypasses the site's Content Security Policy.

    Seen in 2 reports
  11. Differences between how a filter and a renderer parse the same input allowed payloads through.

    Seen in 2 reports
  12. Double URL encoding to get a quote past a single-decoding filter.

    Seen in 2 reports
  13. Dropping the path segment that signature validation is tied to, then changing the file extension.

    Seen in 2 reports
  14. Embedding a JavaScript action in a PDF to run in the app's viewer.

    Seen in 2 reports
  15. Exploit a regex applied after sanitisation that deletes characters and changes the HTML structure.

    Seen in 2 reports
  16. Force IE=9 mode with a meta tag inside an iframe to get script execution from HTML injection.

    Seen in 2 reports
  17. HTML entity encoding of event handlers to evade pattern matching.

    Seen in 2 reports
  18. Load an allowed library from a CDN to get script execution past a CSP.

    Seen in 2 reports
  19. Use mixed-case tags and handlers against case-sensitive WAF rules.

    Seen in 2 reports
  20. Use nested form elements that disappear on re-parsing and namespace changes for mglyph so a style element is parsed differently after DOMPurify sanitisation.

    Seen in 2 reports
  21. Prefix benign text before the payload to get past a weak validator in a redeem code input.

    Seen in 2 reports
  22. Remove the response redirect and use a mouse action to trigger the injected handler on a personnel page.

    Seen in 2 reports
  23. The injected script bypassed the site's content security policy in label colours.

    Seen in 2 reports
  24. The sanitiser only guarded against select plus style and did not treat svg or math combined with style as dangerous.

    Seen in 2 reports
  25. Use a backslash to neutralise quote escaping in a JavaScript string context.

    Seen in 2 reports
  26. Use a protocol-relative URL to get past a filter that blocks absolute links.

    Seen in 2 reports
  27. Use an iframe with a data URI containing an SVG onload handler to execute script.

    Seen in 2 reports
  28. Use an image tag with an error handler when a script tag is blocked.

    Seen in 2 reports
  29. Use old Internet Explorer or compatibility mode so CSS expressions are evaluated as JavaScript.

    Seen in 2 reports
  30. Using a browser-specific event handler that the WAF does not block.

    Seen in 2 reports
  31. Using accesskey and click handlers when angle brackets are stripped.

    Seen in 2 reports
  32. When angle brackets cause a server error, break out of the attribute with a quote and inject event handlers instead of a script tag.

    Seen in 2 reports
  33. A blacklist of function names was bypassed by redirecting the browser instead of calling the blocked function.

    Seen in 1 report
  34. A blacklist that only blocked the word script was bypassed with other HTML and javascript: links.

    Seen in 1 report
  35. A broad host exemption for a tag manager plus inline script allowance let a loader pull attacker script past the WAF.

    Seen in 1 report
  36. A browser's built-in XSS prevention detected the encoding while a third-party filter did not.

    Seen in 1 report
  37. A case-sensitive input filter was bypassed by changing tag casing.

    Seen in 1 report
  38. A client-side template injection payload was used to get past a WAF after traditional server-side template payloads were blocked.

    Seen in 1 report
  39. A closing style tag without its final bracket was still parsed as a close tag, and the parser auto-generated closing tags for injected elements.

    Seen in 1 report
  40. A compact payload fitted within a short input length limit.

    Seen in 1 report
  41. A content security policy bypass let the stored XSS run on the production site.

    Seen in 1 report
  42. A Content-Disposition attachment header was ignored when the response content type was multipart/x-mixed-replace.

    Seen in 1 report
  43. A crafted SWF that is valid JavaScript and hosted on a CSP-allowed domain executes as a script.

    Seen in 1 report
  44. A cross-origin POST set a cookie that was later reflected in a noscript tag.

    Seen in 1 report
  45. A CSP delivered via HTTP header is ignored in the response preview while the same policy in a meta tag is honoured.

    Seen in 1 report
  46. A CSP was bypassed using existing libraries on its allow list.

    Seen in 1 report
  47. A custom HTML sanitiser used a blacklist that could be bypassed with HTML entities.

    Seen in 1 report
  48. A denylist stripped error, load and mouseover handlers but allowed a toggle handler on a details element.

    Seen in 1 report
  49. A deprecated slot-scope attribute evaluated expressions when keywords were filtered.

    Seen in 1 report