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.
-
The application built absolute URLs from a client-supplied host header instead of a fixed trusted host
Seen in 3 reports
-
The OAuth implementation did not check redirect_uri against pre-registered URLs
Seen in 3 reports
-
Documentation linked to a third-party account or repository that did not exist, so anyone could register it
-
RelayState was not validated, and the later fix only checked for a single leading slash, missing protocol-relative values
-
User-controlled URL data was put into the Location header without stripping carriage return and line feed characters
-
The helper removed only host, port and protocol from user input, leaving other reserved URL options controllable
Seen in 1 report
-
$4,000 High
-
-
The preview iframe was rendered without a sandbox attribute, so embedded code could navigate the top window
Seen in 1 report
-
The organisation name was not validated or escaped before being turned into a hyperlink in the invitation email
Seen in 1 report
-
The authorisation endpoint skipped redirect_uri validation on the error path taken when the scope was invalid
Seen in 1 report
-
The middleware put the request's location parameter straight into the Location header without checking the destination
Seen in 1 report
-
$1,000 High
-
-
Links opened with a blank target lacked the noopener relation, leaving the opener window reachable
Seen in 1 report
-
$500 Low
-
-
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
-
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
-
Validation only checked that the redirect path started with a slash, missing protocol-relative and backslash forms
Seen in 1 report
-
The URL validation added in Rails 7 was incomplete, so a crafted URL passed the check
Seen in 1 report
-
$2,400 Medium
-
-
The prefix check for the observability URL did not require a trailing slash, so attacker domains sharing the prefix matched
-
The redirect target was taken from a query parameter, base64-decoded and used directly without an allow-list
Seen in 1 report
-
The path parameter was not sanitised, so traversal sequences altered the redirect target
Seen in 1 report
-
The filter used a blocklist of Latin letters and digits instead of an allow-list of permitted subdomains
Seen in 1 report
-
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
-
The regex did not escape dots in the domain pattern, so any character matched instead of a literal dot
Seen in 1 report
-
Link validation only checked the initial URL and did not follow redirects or normalise Unicode characters
Seen in 1 report