An Open Redirection is when a web application or server uses a user submitted
How can An Open Redirect Web Vulnerability be exploited?
Abusing the Trust Users Have in the Vulnerable Website
Since the domain name in a URL is typically the only indicator for a user to recognize a legitimate website from a non-legitimate one, an attacker can abuse this trust to exploit an open redirect vulnerability on the vulnerable website, and redirect the user to a malicious page to execute further attacks, as explained in the following sections.
Exploiting an Open Redirect Vulnerability for a Phishing Attack
When the user clicks on a link
By exploiting the open redirect vulnerability on the legitimate website, the attacker is redirecting the victim to,
http://attacker.com/phish which is a phishing page that is similar to the legit website. Once the visitor is on the attacker's malicious website, he enters his credentials on the login form which points to a script that is controlled by the attacker. The script is typically used to save the username and the password that is being typed in by the victim, which attackers typically use at a later stage to impersonate the victim on the legitimate website.
The probability of a successful phishing attack
Exploiting an Open Redirect Vulnerability to Redirect Victims to Malicious Websites
It is also possible to redirect an otherwise careful internet user to a site hosting attacker controlled content, like a browser exploit or a page executing a CSRF attack. As above, the chances that the victim clicks the link are higher if the site the link points to is trusted by the victim. An example is an open redirect in a trustworthy page like a banking site, that directs the victim to a page with a CSRF exploit against a vulnerable
Exploiting An Open Redirection Vulnerability to Execute Code
An open redirection vulnerability in a web application can also be used to execute
The above would show an alert window with the content from example.com.
Another URI scheme that’s useful for an attacker is data:. While this does not work in
What is the Impact of an Open Redirection Vulnerability?
As mentioned above the impacts can be many, and vary from theft of information and credentials, to the redirection to malicious websites containing attacker controlled content, which in some cases even cause XSS attacks. So even though an open redirection might sound harmless at first, the impacts of it can be severe should it be exploitable.
How Can You Prevent Open Redirection Vulnerabilities?
The easiest and most effective way to prevent vulnerable open redirects would be to not let the user control where your page redirects him to. If you have to redirect the user based on URLs, you should always use an ID which is internally resolved to the respective URL. If you want the user to be able to issue redirects you should use a redirection page that requires the user to click on the link instead of just redirecting them. You should also check that the