logo

Open Redirect

  • Risk:
  • High

  • Type:
  • Passive
Summary

Open redirects are one of the OWASP 2010 Top Ten vulnerabilities. This check looks at user-supplied input in query string parameters and POST data to identify where open redirects might be possible. Open redirects occur when an application allows user-supplied input (e.g. http://nottrusted.com) to control an offsite redirect. This is generally a pretty accurate way to find where 301 or 302 redirects could be exploited by spammers or phishing attacks.For example an attacker could supply a user with the following link: http://example.com/example.php?url=http://malicious.example.com.

Solution

To avoid the open redirect vulnerability, parameters of the application script/program must be validated before sending 302 HTTP code (redirect) to the client browser. Implement safe redirect functionality that only redirects to relative URI's, or a list of trusted domains

Other info
The 301 or 302 response to a request for the following URL appeared to contain user input in the location header: https://example.com/transact The user input found was: place=evil.com The context was: http://evil.com
References

https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html

https://cwe.mitre.org/data/definitions/601.html

Free security scan for your website