An open redirect vulnerability occurs when a web application uses unvalidated user input to determine the destination of a redirect, allowing an attacker to send users to an untrusted, external website.

This flaw is common in features like login redirects, logout pages, or language selectors that take a URL parameter. Attackers exploit it by tricking users into clicking a legitimate-looking link that actually points to a malicious site, which can be used for phishing, malware distribution, or stealing session tokens via referrer headers. To prevent this, developers should avoid using user input for redirect destinations altogether. If redirects are necessary, implement an allowlist of trusted, relative URLs or site-specific paths. Never rely on client-side validation or simply checking the domain name, as these can be bypassed. Server-side validation must strictly compare the intended redirect target against a predefined list of safe destinations.
Impact: Bypass Protection MechanismGain Privileges or Assume Identity
The user may be redirected to an untrusted page that contains malware which may then compromise the user's system. In some cases, an open redirect can also enable the immediate download of a file without the user's permission, because the redirection to an external site may lead to endpoints on those sites that automatically trigger a download action ("drive-by download" [REF-1478]). This will expose the user to extensive risk. The user's interaction with the web server may also be compromised if the malware conducts keylogging or other attacks that steal credentials, personally identifiable information (PII), or other important data.
Impact: Bypass Protection MechanismGain Privileges or Assume IdentityOther
By modifying the URL value to a malicious site, an attacker may successfully launch a phishing scam. The user may be subjected to phishing attacks by being redirected to an untrusted page. The phishing attack may point to an attacker controlled web page that appears to be a trusted web site. The phishers may then steal the user's credentials and then use these credentials to access the legitimate web site. Because the server name in the modified link is identical to the original site, phishing attempts have a more trustworthy appearance.
Strategy: Input Validation
Strategy: Enforcement by Conversion
Strategy: Attack Surface Reduction
Strategy: Firewall
Effectiveness: Moderate
phpbashjavahtmlLow