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.
-
Break out of the surrounding attribute and inject an SVG element with an onload handler.
Seen in 4 reports
-
Chain a login CSRF so the victim is signed into the attacker's account and the self-XSS becomes reachable.
Seen in 3 reports
-
Encoding tricks such as base64, HTML entities and double URL encoding got payloads past WAFs.
Seen in 3 reports
-
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
-
A cross-origin iframe can bypass same-origin policy by opening a javascript: URL in a new window when multiwindow support is disabled.
-
A strict Content-Security-Policy blocked script execution in modern browsers, leaving only HTML injection.
Seen in 2 reports
-
Break out of an attribute with a quote and add an autofocus event handler.
Seen in 2 reports
-
Medium -
Medium
-
-
Bypass a CSP by using a JSONP endpoint on a whitelisted domain whose callback parameter accepts attacker-controlled script.
Seen in 2 reports
-
Bypass CSP by loading a script from a third-party script host.
Seen in 2 reports
-
Craft injected markup that bypasses the site's Content Security Policy.
Seen in 2 reports
-
Differences between how a filter and a renderer parse the same input allowed payloads through.
-
Double URL encoding to get a quote past a single-decoding filter.
-
Dropping the path segment that signature validation is tied to, then changing the file extension.
-
Embedding a JavaScript action in a PDF to run in the app's viewer.
-
Exploit a regex applied after sanitisation that deletes characters and changes the HTML structure.
-
Force IE=9 mode with a meta tag inside an iframe to get script execution from HTML injection.
Seen in 2 reports
-
HTML entity encoding of event handlers to evade pattern matching.
-
Load an allowed library from a CDN to get script execution past a CSP.
-
Use mixed-case tags and handlers against case-sensitive WAF rules.
-
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
-
Prefix benign text before the payload to get past a weak validator in a redeem code input.
Seen in 2 reports
-
Remove the response redirect and use a mouse action to trigger the injected handler on a personnel page.
-
The injected script bypassed the site's content security policy in label colours.
Seen in 2 reports
-
The sanitiser only guarded against select plus style and did not treat svg or math combined with style as dangerous.
-
Use a backslash to neutralise quote escaping in a JavaScript string context.
Seen in 2 reports
-
Use a protocol-relative URL to get past a filter that blocks absolute links.
-
Use an iframe with a data URI containing an SVG onload handler to execute script.
Seen in 2 reports
-
Use an image tag with an error handler when a script tag is blocked.
-
Use backticks in a name to break out of a code span, or an odd number of backticks to make Telegram reject the message and suppress the alert.
Seen in 2 reports
-
Info -
Info
-
-
Use old Internet Explorer or compatibility mode so CSS expressions are evaluated as JavaScript.
Seen in 2 reports
-
Using a browser-specific event handler that the WAF does not block.
-
Using accesskey and click handlers when angle brackets are stripped.
-
When angle brackets cause a server error, break out of the attribute with a quote and inject event handlers instead of a script tag.
-
A blacklist of function names was bypassed by redirecting the browser instead of calling the blocked function.
Seen in 1 report
-
A blacklist that only blocked the word script was bypassed with other HTML and javascript: links.
Seen in 1 report
-
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
-
A browser's built-in XSS prevention detected the encoding while a third-party filter did not.
Seen in 1 report
-
A case-sensitive input filter was bypassed by changing tag casing.
Seen in 1 report
-
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
-
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
-
A compact payload fitted within a short input length limit.
-
A content security policy bypass let the stored XSS run on the production site.
Seen in 1 report
-
A Content-Disposition attachment header was ignored when the response content type was multipart/x-mixed-replace.
Seen in 1 report
-
A crafted SWF that is valid JavaScript and hosted on a CSP-allowed domain executes as a script.
Seen in 1 report
-
A cross-origin POST set a cookie that was later reflected in a noscript tag.
Seen in 1 report
-
A CSP delivered via HTTP header is ignored in the response preview while the same policy in a meta tag is honoured.
-
A CSP was bypassed using existing libraries on its allow list.
Seen in 1 report
-
A custom HTML sanitiser used a blacklist that could be bypassed with HTML entities.
Seen in 1 report
-
A denylist stripped error, load and mouseover handlers but allowed a toggle handler on a details element.
Seen in 1 report
-
A deprecated slot-scope attribute evaluated expressions when keywords were filtered.
Seen in 1 report