Skip to content

In-depth lesson · CSP bypass

Root causes

Every point the CSP bypass reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 36 of 36
  1. The label colour value from imported data was inserted into the page without sanitisation.

    Seen in 2 reports
  2. The Markdown renderer turned escaped characters inside angle-bracket autolinks into live markup rather than keeping them encoded.

    Seen in 1 report
  3. The admin panel rendered a merchant-supplied details value without HTML-encoding it, and the policy still allowed inline script.

    Seen in 1 report
  4. A query parameter was reflected into the HTML response without output encoding, and the payload was shaped to evade the CDN filter.

    Seen in 1 report
  5. The message listener did not check the sender origin and passed an attacker-controlled follow-up URL straight into a location assignment without validating the scheme.

    Seen in 1 report
  6. The default branch name was not escaped when rendered in the duplicate dashboard modal.

    Seen in 1 report
  7. The viewer trusted HTML produced by the API documentation bundle without stripping dangerous attributes, and a helper allowed script execution despite the policy.

    Seen in 1 report
  8. User-supplied comment text was inserted into the page without HTML-escaping.

    Seen in 1 report
  9. The redaction code reused an HTML-encoded data attribute and inserted it without re-encoding, so encoded HTML became active markup.

    Seen in 1 report
  10. The embed script parsed the page URL and referrer into an object without filtering keys such as the prototype key, letting query parameters pollute the object prototype.

    Seen in 1 report
  11. The failure message field was treated as safe and not sanitised before rendering.

    Seen in 1 report
  12. The filename was not encoded or sanitised when displayed in the rename error message.

    Seen in 1 report
  13. The design filename was not sanitised before being inserted into an HTML attribute, and the link generator interpolated the URL without escaping.

    Seen in 1 report
  14. A type confusion: the sanitisation check compared against the string false while the rendering check tested truthiness, so the string took the unsafe path.

    Seen in 1 report
  15. The CSS scoping logic did not handle an unmatched closing curly brace, so later selectors were not scoped.

    Seen in 1 report
  16. The iteration reference regex allowed any character except double quotes, and the policy lacked a base-uri directive.

    Seen in 1 report
  17. The project path and configuration filename were passed to a raw-HTML directive without encoding, so the sanitiser let benign-looking markup and CSS through.

    Seen in 1 report
  18. A custom ignore-tag callback in the sanitiser let tag-like strings through because its parsing of certain openers differed from the browser's.

    Seen in 1 report
  19. The image link filter did not sanitise the alt attribute when replacing an image with a link.

    Seen in 1 report
  20. The notebook renderer inserted markdown output into a sandboxed iframe without sanitising it, and the iframe kept same-origin plus a traversable internal protocol.

    Seen in 1 report
  21. The deployment key title was inserted into HTML without escaping and rendered through a library that executes script tags even under a strict-dynamic policy.

    Seen in 1 report
  22. The diagram filter used the parent pre element's lang attribute without validating it and concatenated it into an image tag string.

    Seen in 1 report
  23. The policy allowlisted a third-party script bundling AngularJS, and Angular expressions could read the nonce attribute and reuse it.

    Seen in 1 report
  24. The pronunciation value was inserted into an HTML string marked as safe without sanitisation.

    Seen in 1 report
  25. The reference filter used a regex replacement that could be tricked into expanding references inside HTML attributes.

    Seen in 1 report
  26. The code extracted text from a paragraph element and inserted it as HTML without sanitisation, so encoded script tags became active.

    Seen in 1 report
  27. A raw-HTML directive was used on filenames without proper sanitisation.

    Seen in 1 report
  28. The proxy allowed caching of responses with attacker-supplied policy headers, and the original policy lacked the element and attribute script directives that take precedence.

    Seen in 1 report
  29. The proxy endpoint did not filter the redirect header, letting the web server serve an uploaded HTML file as inline content.

    Seen in 1 report
  30. The policy applied to proxied content lacked a form-action directive, so forms in SVGs could submit data.

    Seen in 1 report
  31. The service worker's handling of a resource base authority parameter allowed path traversal, and a same-origin HTML file enabled the policy bypass.

    Seen in 1 report
  32. The code took an element's text content and assigned it to innerHTML without sanitisation.

    Seen in 1 report
  33. The placeholder replacement mechanism did not escape HTML when the placeholder sat inside a span tag.

    Seen in 1 report
  34. The wiki page title was used as link text without HTML sanitisation, and the reference filter inserted it into the page.

    Seen in 1 report
  35. The content-type validation only checked headers that were present and did not reject requests with no content type header.

    Seen in 1 report
  36. The sandbox read a root path parameter from the URL and assigned it to the bundler's public path without validating it as a same-origin relative path.

    Seen in 1 report