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.
-
Use a Unicode character that decodes to a newline as a header separator to inject a second HTTP response with a script body in HTTP response splitting.
Seen in 1 report
-
Use a URL parser mismatch or path encoding so the CSP-setting layer does not match the served path.
Seen in 1 report
-
Use a URL shortener to fit a working HTML link payload into a 35-character name field, such as a newsletter subscription form.
Seen in 1 report
-
Use a URL containing parentheses inside an image BBCode tag to break out of the tag.
Seen in 1 report
-
Use a video element with an onloadstart handler and pad the payload to 32KB to get past a WAF.
Seen in 1 report
-
Use a WebSocket URI scheme in an injected Location header to get Firefox to execute script in a redirect response.
Seen in 1 report
-
Use alternative syntax that the WAF allows when a script payload is blocked.
Seen in 1 report
-
Use an accesskey attribute and an event handler when the initial fix blocks the lowercase onclick keyword.
Seen in 1 report
-
Use an allowlisted third-party script host that reflects a callback parameter to bypass CSP.
Seen in 1 report
-
Use an anchor element with a mouse-over event handler when script tags are filtered, for example in search boxes.
Seen in 1 report
-
Use an anchor element with an event handler instead of a script tag to slip past the Akamai firewall.
Seen in 1 report
-
Use an embed element with a data: URL to bypass restrictions.
Seen in 1 report
-
Use an embed tag with a null byte in the src attribute to load an external SWF carrying the payload.
-
Use an encoded colon in a javascript: link so the sanitiser's literal match misses it and the browser decodes it later.
Seen in 1 report
-
Use an encoded iframe, textarea or image payload to get past reflection defences.
Seen in 1 report
-
Use an escaped colon that gets decoded by attribute parsing to bypass the URL scheme check.
-
Use an expression that escapes the Angular sandbox to reach arbitrary JavaScript.
Seen in 1 report
-
Use an FTP URL instead of http or https in a dangling markup injection, since Chrome's defence only blocked http and https schemes.
Seen in 1 report
-
Use an HTML page whose meta tag points to an SVG with script so the fetcher stores it as an image.
Seen in 1 report
-
Use an HTML-entity-encoded script tag so the server decodes and stores it after the WAF blocks plain and URL-encoded script.
Seen in 1 report
-
Use an iframe with a srcdoc attribute to execute script and get past CSP.
Seen in 1 report
-
Use an iframe with a srcdoc attribute to get past a filter that blocks script tags.
Seen in 1 report
-
Use an iframe with a srcdoc attribute to load an uploaded script when script tags are filtered from messages.
Seen in 1 report
-
Use an image element's error event instead of blocked keywords such as alert and confirm.
Seen in 1 report
-
Use an image tag with an error handler when a blacklist strips script tags.
Seen in 1 report
-
Use an image tag with an onerror handler when a script tag payload is blocked by a WAF.
Seen in 1 report
-
Use an invalid port so the redirect is blocked in Firefox while the page still renders a clickable javascript: link.
Seen in 1 report
-
Use an object tag with a javascript data value to get past the WAF.
Seen in 1 report
-
Use an object tag with a script URI and obfuscation to get past a CloudFront WAF.
Seen in 1 report
-
Use an obscure event handler and optional chaining to get past a WAF.
Seen in 1 report
-
Use an open redirect on the same origin so jQuery Mobile fetches the redirected URL and inserts it via innerHTML.
-
Use an SVG onload payload in a reflected SQL error to get past the WAF.
Seen in 1 report
-
Use an SVG onload payload to get past the WAF after SQL injection payloads are blocked.
Seen in 1 report
-
Use an SVG onload payload when a simple tag and a quote followed by a tag change the HTML structure but do not alert.
Seen in 1 report
-
Use an SVG onload payload with HTML entity encoding when simpler payloads are blocked.
Seen in 1 report
-
Use an SVG script element when the serialiser only strips HTML script elements.
Seen in 1 report
-
Use an unclosed image tag to capture following page content and send it to an allowed third-party endpoint.
Seen in 1 report
-
Use AngularJS script gadgets from an allow-listed domain to run script despite CSP.
Seen in 1 report
-
Use arithmetic operators or optional chaining to avoid semicolons when input is reflected inside a JavaScript function.
Seen in 1 report
-
Use backticks instead of parentheses to get around parenthesis filtering.
Seen in 1 report
-
Use backticks instead of parentheses when brackets are filtered.
Seen in 1 report
-
Use base tag injection where the CSP has no base-uri directive.
Seen in 1 report
-
Use base64 and eval to run JavaScript without spaces and keep syntax valid with a trailing constructor.
Seen in 1 report
-
Use CDATA sections to get past a white list sanitiser.
Seen in 1 report
-
Use control characters after an angle bracket, a single percent sign, and full-width or small-form Unicode characters to get past a WAF and back-end filters.
Seen in 1 report
-
Use crafted input-tag and details-tag payloads to get past a WAF that blocks common XSS payloads.
Seen in 1 report
-
Use CSS attribute selectors to load external resources conditionally based on a hidden token value, exfiltrating it character by character.
Seen in 1 report
-
Use CSS character escapes to construct HTML entities and bypass a style sanitizer, injecting inline CSS such as url().
Seen in 1 report
-
Use CSS custom fonts with per-character URLs to leak a hidden secret character by character when an admin views the content.
Seen in 1 report
-
Use data attributes that the sanitiser leaves in place to control the endpoint of a POST request.
Seen in 1 report