Open Redirects
Last updated
Was this helpful?
Last updated
Was this helpful?
This can be exploited for phishing attacks, where users are tricked into visiting malicious websites that steal sensitive information.
Validate and restrict URL parameters to allow only trusted, predefined URLs for redirection.
The example below is based on PostSwigger's lab.
If we perform a code review at the front-end code, we will notice the the Back to Blog
button searches a regex pattern (http://
or https://
) and if it redirects to it if one is found (Figure 1).
As a result, we can pass a url
parameter ourselves redirecting to the exploit server (Figure 2).