Protecting Against Open Redirect
Open redirect (also known as unvalidated redirects and forwards) is a URL redirection vulnerability. An attacker can exploit it to redirect users from a trusted to a potentially malicious third-party website and steal their credentials via a phishing attack. To protect against this vulnerability, we recommend configuring Plesk to restrict URL redirection.
The vulnerability is made possible by the
parameters, which are used when you set up automated logging in to
success_redirect_url parameter contains one or more hostnames to which a user is
redirected after a successful login, while
failure_redirect_url—after a failed login attempt
or logging out.
The vulnerability can affect all Plesk servers, regardless of whether automatic logging in to Plesk has been set up or not. To protect against it, you need to add an entry to the panel.ini file. The exact entry varies depending on whether automatic logging in to Plesk has been set up.
To protect Plesk against open redirect if you have not set up automatic logging in to Plesk:
Add the following lines to the panel.ini file:
[security] trustedRedirectHosts =
trustedRedirectHosts line is empty and no hostnames are specified.
This way you forbid Plesk from redirecting to any hostnames using the
To protect Plesk against open redirect if you have set up automatic logging in to Plesk:
Add an entry to the panel.ini file according to the following pattern:
[security] trustedRedirectHosts = hostname
hostname is a trustworthy hostname to which you allow URL redirection via
trustedRedirectHosts setting accepts one or more hostnames
separated by commas and specified in the following format:
- A domain name, for example
- An IP address, for example
- Wildcard subdomains, for example
Note: When specifying hostnames in
only use the asterisk (*) character
following the pattern shown above (
your server may remain vulnerable. For example, the hostnames
192.0.2.* are insecure because they can match
Here is a valid example of the
trustedRedirectHosts setting in the
[security] trustedRedirectHosts = example.com,192.0.2.1,*.example.com
hostnames used in the
Note: When specifying several hostnames in
trustedRedirectHosts, do not
add the whitespace ( ) character before or after the comma (,) that
separates hostnames. Otherwise, the hostname will not be handled
correctly and URL redirection will fail.