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.
-
HTML-encoded colons without trailing semicolons slipped past the protocol check.
-
HTML-encoded tab characters bypassed a regex-based input filter.
Seen in 1 report
-
HTML-encoded tags in a markdown link to a private issue became active markup after redaction.
Seen in 1 report
-
In live mode the payload needs the admin to click a run-the-action confirmation before it fires.
Seen in 1 report
-
Include a legitimate https link alongside a javascript URI so the filter accepts the message.
Seen in 1 report
-
Inject a base element that the CSP appears to block, then use an image tag whose relative URL resolves against it.
Seen in 1 report
-
Inject a base tag to make the page load scripts from your own server, which the CSP still allows.
Seen in 1 report
-
Inject a Connection header naming Location so a proxy removes the redirect and the response becomes a 200 with attacker body.
Seen in 1 report
-
Inject a Content-Encoding header and a compressed payload with a matching Content-Length so the WAF does not inspect the body.
-
Inject a double quote to break out of an attribute when the rel filter does not account for its position inside other attributes.
Seen in 1 report
-
Inject a meta tag to spoof the page charset to UTF-7 and use a UTF-7 encoded style tag.
-
Inject a new connect-src directive through a trusted-sites feature to bypass CSP.
Seen in 1 report
-
Inject an event handler in an attribute value when tag stripping is the only defence.
Seen in 1 report
-
Inject an SVG with an onload handler to show that the sandbox did not apply an opaque origin.
Seen in 1 report
-
Inject an unclosed base tag where no whitespace follows the injection point to change the base URL and load same-origin scripts.
Seen in 1 report
-
Inject HTML elements even when a strict policy blocks script, limiting impact to HTML injection.
Seen in 1 report
-
Inject markup that changes the referrer policy to leak a uuidkey, then use it to reach an internal error page.
Seen in 1 report
-
Inject the payload twice, first a harmless image tag and then the real one, to get past blocking in a search input.
Seen in 1 report
-
Inject anchor elements with id and name attributes to clobber a global variable in a DOM clobbering attack.
-
Inject script that sets the returnValue of a modal dialog to bypass Internet Explorer's XSS filter.
Seen in 1 report
-
Insert a carriage-return line-feed boundary sequence after the payload in a multipart body to bypass filtering.
Seen in 1 report
-
Insert a div inside an svg so the browser re-parses and mutates sanitised HTML in a mutation XSS attack.
Seen in 1 report
-
Insert a newline in the DOCTYPE so the unsafe-file check misses it and WebKit sniffs the raw XHTML file as HTML on iOS.
Seen in 1 report
-
Insert a newline into a javascript: URL to get past a check that only looks for the literal scheme string.
Seen in 1 report
-
Insert a null byte into the payload to get past a keyword blacklist.
Seen in 1 report
-
Insert a script tag inside an event handler name to get past a filter that strips script tags and handlers in an album description.
Seen in 1 report
-
Insert a tab character inside the javascript: scheme to evade the keyword filter after duplicating the parameter in a redirect.
Seen in 1 report
-
Insert angle brackets inside an event handler name so the server's character stripping produces a working handler against the Wordfence WAF.
Seen in 1 report
-
Insert braces inside blocked words to get past a WAF blacklist on an ajax endpoint.
Seen in 1 report
-
Insert dots into a JavaScript scheme to get past a replace function that strips slashes and angle brackets in redirect URL parameters.
Seen in 1 report
-
Insert dummy characters inside an event handler name so the filter removes them and leaves a working handler on a WAF-protected registration form.
Seen in 1 report
-
Intercept the profile update request to bypass client-side encoding in the public profile location field.
Seen in 1 report
-
Intercept the response from the current-user API and use match and replace to flip false values to true to reveal the admin tab on a read-only account.
Seen in 1 report
-
jQuery processed injected HTML and executed script tags because unsafe-eval was enabled.
Seen in 1 report
-
Use JSFuck-style encoding to work around uppercasing and blocked characters.
Seen in 1 report
-
Keep the image content type while changing the extension to .html so the file is served as HTML in a profile picture upload.
Seen in 1 report
-
Load a script from a public host that the CSP script-src allowlist trusts.
-
Load the injected script from a same-origin job artifact to satisfy the content security policy in Mermaid diagram rendering.
-
Load the script from a CI pipeline artifact to get past the content security policy.
Seen in 1 report
-
Load the script from an allowed external domain to get past the content security policy.
Seen in 1 report
-
Load an outdated AngularJS library from an allowed CDN and use its sandbox escape to get past CSP via a sticker alt attribute.
Seen in 1 report
-
Use lookalike domains that begin with the trusted name to pass a substring-based domain check.
Seen in 1 report
-
Make the first tag a harmless SVG and place the real payload after it to get past a comment filter.
Seen in 1 report
-
Use malformed HTML tags to slip past a blacklist sanitizer and a regex check in a client-side sanitizer.
Seen in 1 report
-
Use malformed or unusual tag syntax to slip past a greedy regular expression that strips text between angle brackets.
Seen in 1 report
-
Use a malformed tag that survives the add function's event-handler stripping in bookmark import.
Seen in 1 report
-
Manipulate the MIME type in a file viewer to get content interpreted as HTML.
Seen in 1 report
-
Manipulate the reflected Content-Type header to make the browser parse the response as UTF-16 or multipart, bypassing an attribute filter.
Seen in 1 report
-
Manipulate the resourceBaseAuthority parameter to traverse paths when registering a service worker.
Seen in 1 report
-
Use mass assignment to inject quotes that the filter did not catch in a newsletter form.
Seen in 1 report