Skip to content

In-depth lesson · Open redirect

Root causes

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

Back to the lesson 1 to 22 of 22
  1. The application built absolute URLs from a client-supplied host header instead of a fixed trusted host

    Seen in 3 reports
  2. The OAuth implementation did not check redirect_uri against pre-registered URLs

    Seen in 3 reports
  3. Documentation linked to a third-party account or repository that did not exist, so anyone could register it

    Seen in 2 reports
  4. RelayState was not validated, and the later fix only checked for a single leading slash, missing protocol-relative values

    Seen in 2 reports
  5. User-controlled URL data was put into the Location header without stripping carriage return and line feed characters

    Seen in 2 reports
  6. The helper removed only host, port and protocol from user input, leaving other reserved URL options controllable

    Seen in 1 report
  7. The preview iframe was rendered without a sandbox attribute, so embedded code could navigate the top window

    Seen in 1 report
  8. The organisation name was not validated or escaped before being turned into a hyperlink in the invitation email

    Seen in 1 report
  9. The authorisation endpoint skipped redirect_uri validation on the error path taken when the scope was invalid

    Seen in 1 report
  10. The middleware put the request's location parameter straight into the Location header without checking the destination

    Seen in 1 report
  11. Links opened with a blank target lacked the noopener relation, leaving the opener window reachable

    Seen in 1 report
  12. The redirect endpoint concatenated user-controlled parameters and only checked the origin with a regex, which a second redirect on a subdomain could bypass

    Seen in 1 report
  13. The shortening service validated destinations with an overly permissive regex, and the API key plus endpoint were exposed in client-side JavaScript

    Seen in 1 report
  14. Validation only checked that the redirect path started with a slash, missing protocol-relative and backslash forms

    Seen in 1 report
  15. The URL validation added in Rails 7 was incomplete, so a crafted URL passed the check

    Seen in 1 report
  16. The prefix check for the observability URL did not require a trailing slash, so attacker domains sharing the prefix matched

    Seen in 1 report
  17. The redirect target was taken from a query parameter, base64-decoded and used directly without an allow-list

    Seen in 1 report
  18. The path parameter was not sanitised, so traversal sequences altered the redirect target

    Seen in 1 report
  19. The filter used a blocklist of Latin letters and digits instead of an allow-list of permitted subdomains

    Seen in 1 report
  20. The fix used an incomplete denylist that missed path traversal combined with double slashes, which the server normalised into a protocol-relative URL

    Seen in 1 report
  21. The regex did not escape dots in the domain pattern, so any character matched instead of a literal dot

    Seen in 1 report
  22. Link validation only checked the initial URL and did not follow redirects or normalise Unicode characters

    Seen in 1 report