In-depth lesson · XSS
Root causes
Every point the XSS reports back under this heading, best-backed first, each with the reports it is seen in.
-
Sanitisation code used a div element's innerHTML to fix unclosed tags, which executed scripts when inserted into the DOM.
Seen in 1 report
-
Sanitisation decoded and checked input only once, so double encoding bypassed it.
Seen in 1 report
-
Sanitisation happened before a server-side image re-upload modified the HTML, so the final HTML was never re-sanitised.
Seen in 1 report
-
Sanitised HTML was modified afterwards by a faulty regex that removed an uneven number of quotes, and attachments were served inline with attacker-controlled MIME types.
-
The sanitiser allowlist permits absolute same-origin URLs in SVG use elements.
Seen in 1 report
-
The sanitiser did not strip the form tag, allowing arbitrary form submissions.
Seen in 1 report
-
The sanitiser mishandles emoji shortcode expansion inside an attribute.
Seen in 1 report
-
The sanitiser's view of safe content diverges from what the browser parses, and pasted content is styled before sanitisation.
Seen in 1 report
-
Sanitisers failed to account for browser-specific parsing quirks such as namespace switching, case sensitivity, animation attributes, XSLT and Safari's image import behaviour.
Seen in 1 report
-
Sanitising with a library's default configuration can be bypassed with script gadgets.
Seen in 1 report
-
Sanitisers failed to account for obscure SVG and XML features such as namespace switching, animation elements, XSLT stylesheets and browser-specific behaviours.
-
A campaign name was saved and output into admin pages without HTML encoding.
Seen in 1 report
-
Script standard output was inserted into the page without HTML encoding.
-
Search and category parameters were reflected into HTML without escaping.
Seen in 1 report
-
Medium
-
-
The search field was reflected without encoding or sanitisation.
Seen in 1 report
-
Search input was reflected without output encoding.
Seen in 1 report
-
Search input was reflected into the page without output encoding, and there was no X-Frame-Options or frame-busting script.
Seen in 1 report
-
Search input was reflected with incomplete sanitisation that blocks script tags but not event-handler attributes on other elements.
Seen in 1 report
-
Search input was reflected without HTML escaping, allowing attribute breakout.
Seen in 1 report
-
Search input was inserted back into the page by client-side JavaScript without escaping before rendering.
Seen in 1 report
-
Search input was inserted into an HTML node AngularJS treats as a template, so expressions were evaluated rather than shown.
Seen in 1 report
-
Search input was not encoded before being rendered back for work and school accounts.
-
Search input was reflected into a dfn tag without output encoding and the input filter was insufficient.
Seen in 1 report
-
Search keywords were not sanitised on the search criteria page.
-
The search parameter was only partially sanitised before reflection.
Seen in 1 report
-
The search parameter was reflected without HTML encoding.
Seen in 1 report
-
The search parameter was reflected without output encoding and the WAF relies on a blacklist.
Seen in 1 report
-
Sensitive session tokens were stored in localStorage, so script execution could read and exfiltrate them.
Seen in 1 report
-
The server or framework was not configured to send the X-XSS-Protection header.
Seen in 1 report
-
Service worker registration used document.getElementById to read a domain from a div's innerText, which could be clobbered by injecting an element with the same id.
Seen in 1 report
-
Session cookies lacked the HttpOnly flag, allowing script access.
Seen in 1 report
-
Session tokens were passed in URL query parameters during redirects, and server size limits could break the chain and expose the token.
-
Settings values were inserted into the page template without output encoding or validation.
Seen in 1 report
-
Several metadata and output fields were not escaped when generating HTML.
-
Several portal fields were rendered without output encoding, so stored markup ran for anyone viewing the page.
Seen in 1 report
-
Shallow copying of the internal property set during rule cloning and failure to reattach CSSOM wrappers after a copy-on-write fork let mutations reach the shared stylesheet.
Seen in 1 report
-
Shortcode attributes were not sanitised or escaped before rendering in the administrator preview.
Seen in 1 report
-
Single quotes were not escaped when embedding input into JSON in a script context.
Seen in 1 report
-
Single quotes were escaped by doubling but backslashes were not escaped.
Seen in 1 report
-
SMS messages were stored and rendered in the internal portal without output encoding.
Seen in 1 report
-
SMTP error text was inserted into the page using an HTML-rendering method without escaping.
Seen in 1 report
-
Social media link fields lacked proper validation and sanitisation, so stored links could point to arbitrary downloads.
Seen in 1 report
-
Social media links were not validated and the client-supplied account address was trusted without verifying ownership.
-
Social profile URLs were not validated or sanitised on the server side.
-
Software written decades ago without security in mind had unsafe defaults and weak input sanitisation.
-
A sort value was placed into an exception message rendered without HTML encoding.
Seen in 1 report
-
Source map fetching did not enforce the same controls as normal requests and honoured response headers.
Seen in 1 report
-
Special characters were not escaped when rendering input into HTML.
Seen in 1 report
-
Special elements in output were not neutralised before a downstream component processed them.
Seen in 1 report
-
State-changing POST requests were accepted without a CSRF token.
Seen in 1 report