Skip to content

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.

Back to the lesson 1,801 to 1,850 of 2,345
  1. The runtime trusted a request parameter to choose where theme and styling resources were loaded from, without restricting allowed hosts.

    Seen in 1 report
  2. The same value was interpreted as a string for the hostname check and as an options object for the postMessage targetOrigin due to JavaScript overload resolution.

    Seen in 1 report
  3. The sandbox blocked direct access to Facebook-rendered elements, but DOM traversal from an app-owned wrapper reached them anyway.

    Seen in 1 report
  4. The sandbox iframe had allow-popups and allow-popups-to-escape-sandbox, and the JavaScript override of window.open could be bypassed via a nested iframe's contentWindow.open.

    Seen in 1 report
  5. The sandbox parser and rewriter did not recognise newer ECMAScript constructs, so their constructors or import calls were not replaced with sandboxed versions.

    Seen in 1 report
  6. The sandbox's variable-name filtering did not decode Unicode escape sequences before checking forbidden identifiers.

    Seen in 1 report
  7. The sanitisation decision compared the field name case-sensitively against a fixed list, so a differently-cased or padded name skipped sanitisation while still updating the same database column.

    Seen in 1 report
  8. The sanitiser and browser parsed noscript and svg or math with style differently, so cleaned output was re-interpreted as executable markup.

    Seen in 1 report
  9. The sanitiser blocked plain javascript: URLs but not ones containing encoded control characters.

    Seen in 1 report
  10. The sanitiser built an inline CSS background-image rule from the body's background attribute without quoting the value.

    Seen in 1 report
  11. The sanitiser called the shortcode processor before stripping tags and shortcode syntax.

    Seen in 1 report
  12. The sanitiser cleaned a browser-generated clone of the selected option but did not re-sanitise it after the browser refreshed that clone from the original option.

    Seen in 1 report
  13. The sanitiser compared the whole trimmed property value against 'fixed', so any value with extra tokens such as !important skipped the mitigation.

    Seen in 1 report
  14. The sanitiser did not account for node types such as processing instructions and CDATA sections that XML and HTML parsers treat differently.

    Seen in 1 report
  15. The sanitiser did not handle certain HTML nodes such as CDATA sections.

    Seen in 1 report
  16. The sanitiser did not treat same-origin SVG use elements as dangerous even though Firefox executes script from them.

    Seen in 1 report
  17. The sanitiser does not strip arbitrary data attributes that the site's JavaScript uses to choose request endpoints.

    Seen in 1 report
  18. The sanitiser marked output as safe HTML, letting certain tags such as links render.

    Seen in 1 report
  19. The sanitiser matched the literal string javascript: before the browser decoded HTML entities.

    Seen in 1 report
  20. The sanitiser parsed with the fragment algorithm while the sink re-parsed with the document algorithm, and they disagreed on SVG foreign content.

    Seen in 1 report
  21. The sanitiser processed SVG content in SVG context then renamed the outer element, causing the browser to reinterpret the content.

    Seen in 1 report
  22. The sanitiser removed the inner script substring only once, so a nested tag reassembled into a working script tag after cleaning.

    Seen in 1 report
  23. The sanitiser replaced anchor tags with placeholders before escaping, then reinserted them, letting an attacker break out of an HTML attribute.

    Seen in 1 report
  24. The sanitiser unescaped HTML entities before stripping tags.

    Seen in 1 report
  25. The sanitiser used a blocklist that did not account for plus signs inside tags, so the browser still parsed the modified tags.

    Seen in 1 report
  26. The sanitiser used a prefix-sensitive equality check on element names instead of a prefix-insensitive match, so prefixed elements were not recognised and their javascript: URLs were not stripped.

    Seen in 1 report
  27. The sanitiser trusted a property on the node itself as a marker that it had already been cleaned, and DOM clobbering let an attacker-controlled child satisfy that check for its parent.

    Seen in 1 report
  28. The sanitiser used a single-pass string replacement that could be defeated by nesting the dangerous pattern.

    Seen in 1 report
  29. The sanitiser validated pasted HTML before the browser parser mutated it into a different executable DOM structure.

    Seen in 1 report
  30. The sanitiser's allow-list let SMIL values and by attributes through without URI validation, and its animation block only covered href.

    Seen in 1 report
  31. The sanitiser's allow-list permitted arbitrary class attributes on code and pre elements, and in some products further transformations ran after sanitisation.

    Seen in 1 report
  32. The sanitiser's attribute allow and deny logic missed attributes that browsers can still act on.

    Seen in 1 report
  33. The sanitiser's comment regular expression only matched the standard comment ending and missed alternative endings that browsers accept.

    Seen in 1 report
  34. The sanitiser's protection logic could be tricked by a special string and a data attribute that disabled filtering.

    Seen in 1 report
  35. The redirect sanitiser did not block javascript: URLs and the home page did not sanitise the parameter at all.

    Seen in 1 report
  36. The sanitiser allowed a use element to reference a data URI without inspecting the embedded SVG content.

    Seen in 1 report
  37. The Sanitizer API's baseline-unsafe element list omits the base element, so a custom configuration that allows it lets an injected base element change URL resolution for the whole document.

    Seen in 1 report
  38. The sanitiser validates tags and attributes but not URL schemes in href or src, and the app has no Content-Security-Policy.

    Seen in 1 report
  39. The save endpoint lacked a CSRF token check and stored action names were output without HTML encoding.

    Seen in 1 report
  40. The scanned URL was inserted with innerHTML without escaping, unlike other fields on the page.

    Seen in 1 report
  41. The scanner validates with a URL parser that strips only ASCII whitespace while the Omnibox strips Unicode whitespace, so a leading ideographic space hides the scheme.

    Seen in 1 report
  42. The scheme validation is not atomic with the navigation it guards, creating a time-of-check-to-time-of-use race.

    Seen in 1 report
  43. The scraping library returned metadata unsanitised and the example app inserted it into HTML unescaped.

    Seen in 1 report
  44. The script parsed the page URL and referrer into an object without filtering keys such as __proto__, allowing prototype pollution.

    Seen in 1 report
  45. The search group name was stored and rendered into the discount page without output encoding, and target fields were trusted from the request.

    Seen in 1 report
  46. The search input was reflected into the page without output encoding.

    Seen in 1 report
  47. The search input was sanitised by a custom filter that failed to decode HTML entities before checking for dangerous characters, and the site lacked X-Frame-Options and the HttpOnly cookie flag.

    Seen in 1 report
  48. The search page inserted the user query into the DOM without encoding.

    Seen in 1 report
  49. The search parameter echoed into an attribute without attribute-safe escaping.

    Seen in 1 report
  50. The search parameter was inserted into an HTML attribute without context-aware encoding.

    Seen in 1 report