Skip to main content
miji.be

Open Redirect

A web application vulnerability that redirects users to any externally specified URL without validation. Exploited in phishing attacks.

Aug 23, 2026 / About 1 min read

Security

An open redirect is a vulnerability in which a web application uses a URL parameter value as a redirect destination without validating it. OWASP (Open Web Application Security Project) catalogs it in the Top 10 as CWE-601 (URL Redirection to Untrusted Site), mapped to Broken Access Control (A01), the top-ranked category in the 2025 edition.

Here is a concrete example. With a URL like "https://trusted-site.com/redirect?url=https://evil-site.com", if trusted-site.com redirects to the url parameter value without validation, the user clicks what appears to be a link on a trusted domain but ends up on a malicious site.

Open redirects are exploited in phishing attacks because a trusted domain's URL serves as the entry point. Email security filters and users performing visual checks tend to judge a link as safe if it starts with a legitimate domain.

URL shortening services are inherently redirect services, making them closely related to the open redirect problem. Malicious actors using shortening services to create links to phishing sites is a real-world occurrence. Shortening services do take countermeasures, but which methods they use and how much they catch is generally not disclosed. The measures visible to users include warning screens that show the destination before redirecting (splash pages) and a channel for reporting abuse. The presence of those features does not mean that links issued through the service are safe. Rather than judging safety from assumptions about detection, it is more reliable to go by what can be checked from the outside.

To prevent open redirects in your own applications, effective measures include restricting redirect destinations to a whitelist, allowing only relative URLs, and validating the redirect target's domain. Implementations that pass URL parameters directly as redirect destinations should be avoided in all cases.

Two loopholes commonly survive validation that looks correct. The first is matching the domain by prefix: a URL such as "https://trusted-site.com.attacker-domain.example/" extends the hostname to the right and slips through a prefix check, so parse the URL, extract the hostname, and require an exact match against the allowlist. The second is treating every value that begins with a slash as a relative URL: "//attacker-domain.example/" is interpreted as a scheme-relative URL and sends the browser to another domain, so values starting with two slashes must be handled as external URLs.

Was this article helpful?

Related Terms

Phishing

A cyberattack that uses deceptive links and websites to trick users into revealing sensitive information.

Input Validation

The process of verifying whether input data from users matches the expected format and range. One of the security measures.

XSS

Short for Cross-Site Scripting. An attack technique that injects malicious scripts into web pages to steal users' information.

301 Redirect

A permanent HTTP redirect that tells browsers and search engines the resource has moved permanently to a new URL.

URL Rewrite

A server-side technique that internally maps a requested URL to a different resource without changing the URL displayed in the browser.

Client-Side Redirect

A redirect executed by the browser using HTML meta tags or JavaScript, after the initial page has been partially loaded.

Related Articles

Short URL Security - Phishing Risks, Safe Sharing Practices, and Protection Guide

A comprehensive guide to short URL security. Understand phishing risks, malware distribution via shortened links, and best practices for safe sharing.

Short URL Phishing - How to Spot Scams and Protect Yourself from Malicious Links

Learn to identify phishing attacks that use short URLs. Covers 5 common scam patterns, URL preview tools, and practical defense strategies.

How to Spot Suspicious URLs - 5 Checkpoints to Avoid Getting Tricked

A beginner-friendly guide to spotting phishing scams. Learn 5 easy checkpoints including the https padlock, domain reading tricks, and short URL safety.

FAQ

How dangerous is an open redirect?
On its own, it does not directly cause data breaches or system compromise, but it significantly increases the success rate of phishing attacks. Because a trusted domain's URL serves as the entry point, users are more easily deceived. The OWASP Top 10 lists it as CWE-601 under Broken Access Control (A01), the top-ranked category in the 2025 edition.
Is a URL shortening service a type of open redirect?
Technically it is a redirect service, but the destination is limited to the URL registered with the service, and a request parameter cannot swap it for an arbitrary address. That is what separates it from a vulnerability that turns an externally supplied value into the destination. The registered destination itself can still be malicious, so confirm who sent a short URL before opening it.
How can I check if my site has an open redirect vulnerability?
Review any endpoints that perform redirects and check whether externally supplied URLs are being set directly in the Location header without validation. Automated scanning with tools like OWASP ZAP is also effective.

Put the terms to work

Shorten a URL for Free