Join our Newsletter — 33% off our NHI Course

Open Redirect Bypass

Open Redirect Bypass is a way of making a site or application redirect a user to an untrusted destination when the redirect would normally be blocked. It usually works by manipulating the redirect target, parameters, or URL encoding so a validation check is fooled, which can aid phishing, token theft, or trust abuse.

What an open redirect bypass actually exploits

An open redirect bypass takes advantage of the gap between what a site intends to allow and what its redirect validation actually recognises. The application may try to block external destinations, but a crafted target, parameter structure, or encoding variant still gets the browser sent onward.

The important point is that the weakness is usually not the redirect itself, but the validation logic around it. If the application can be persuaded to treat an attacker-controlled URL as safe, the redirect becomes a delivery mechanism for trust abuse rather than a benign navigation feature.

That is why bypasses matter in login flows, password resets, post-authentication return URLs, and any feature that forwards users after a click. Even when the destination page belongs to another domain, the initial trust in the original site can make the malicious handoff far more effective.

Why it becomes dangerous in real applications

Open redirect bypasses are dangerous because they let attackers borrow the reputation of a legitimate site. A link that begins on a trusted domain can lower suspicion, pass email filters more easily, and increase the chance that users follow through to a malicious page.

When the redirect sits inside an authentication or OAuth flow, the impact can be worse. Attackers may try to abuse the redirect to steer users away from a legitimate endpoint, interfere with the expected handoff, or support token theft and session capture patterns that rely on user trust in the first hop.

The attack is often subtle because the application may appear to have a control in place. In practice, bypasses emerge when validation is based on weak string checks, incomplete allowlists, inconsistent decoding, or assumptions about URL structure that can be reshaped by an attacker.

How organisations verify exposure

Exposure review starts with finding every place the application accepts a redirect target, return URL, next parameter, callback parameter, or similar handoff value. Teams should inventory those entry points, map where they are reachable, and identify which ones are exposed to unauthenticated users, logged-in users, or external links.

Then the business logic needs to be checked against the actual validation behaviour, not just the code comment or design intent. A redirect that appears safe in one code path may still be exploitable through alternate encoding, parameter pollution, wrapper URLs, or other parsing differences that the application did not anticipate.

For internet-facing applications, the review should also consider how the redirect behaves in practice under phishing conditions. NHIMG’s Open Redirect Guide covers why exact redirect URI matching, safe redirect design, and detection of redirector abuse matter when the application is exposed to adversarial traffic.

Detection, containment, and secure redesign

Detection should focus on unusual destination patterns, unexpected external handoffs, and redirect requests that contain encoded or nested URLs. A bypass often leaves a trail in logs, especially when the destination is outside the expected domain set or when the same source parameter is being probed with many variants.

Containment is strongest when the application stops accepting arbitrary destinations and instead uses fixed destinations, opaque lookup keys, or strict allowlists. The more the application can rely on pre-approved internal routes rather than user-supplied URL strings, the less room there is for bypass logic to fail.

For teams maintaining web application guidance, NHIMG’s Web Application Attacks Guide is useful context for understanding how open redirect sits alongside other parameter and trust-boundary failures. If the bypass appears in a framework-specific implementation, the Express.js Security Guide is a practical reference for redirect handling, middleware order, and related hardening concerns.

Risk and Threat Considerations

Open redirect bypass is attractive to attackers because it turns a trusted site into a launch point for phishing and trust abuse. The immediate danger is not only user deception, but also the possibility that the redirect can support theft of sensitive authorization artefacts when it appears inside an auth or sign-in journey.

Failure mechanism: The application validates the redirect target with checks that can be bypassed through alternate encodings, malformed structures, nested URLs, or inconsistent parsing between components.

Impact: Users are sent to attacker-controlled destinations under the cover of a trusted domain, which can enable phishing, brand impersonation, and downstream compromise of credentials, sessions, or tokens.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 and MITRE ATT&CK address the attack and risk surface, while OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP ASVS V10 — OAuth and OIDC Open redirect bypass can affect OAuth redirect handling and authorization code handoff.
V8 — Authorization Redirect destination checks are a form of application authorization over allowed navigation targets.
V16 — Security Logging and Error Handling Redirect abuse is often discovered through anomalous logs and validation failures.
Recommendation — Enforce exact redirect URI matching and reject unapproved callback destinations. Validate redirect targets against a strict allowlist before issuing the redirect. Log rejected redirect attempts and review repeated bypass probes for active abuse.
OWASP API Security Top 10 API10 — Unsafe Consumption of APIs Redirect-bypass patterns often exploit unsafe trust in user-controlled URL inputs and downstream requests.
Recommendation — Treat externally supplied URLs as untrusted and constrain all redirect destinations.
NIST SP 800-53 Rev 5 AC-4 — Information Flow Enforcement Redirect controls enforce where information and user flows are permitted to go.
SI-10 — Information Input Validation The weakness is caused by insufficient validation of redirect parameters and URL forms.
Recommendation — Restrict redirects to approved destinations and block arbitrary external flows. Validate redirect inputs with strict parsing and canonicalisation before use.
MITRE ATT&CK T1566 — Phishing Open redirect bypass is commonly used to make phishing links more credible and effective.
Recommendation — Correlate trusted-domain redirect activity with phishing investigation workflows.
CIS Controls v8 CIS-16 — Application Software Security Application hardening and secure design are directly relevant to preventing redirect bypasses.
Recommendation — Harden redirect handling so only approved internal destinations are reachable.

Practitioner Guidance

Common misunderstanding: A redirect is not safe just because the destination looks local in a quick test. Practitioners should assume bypass attempts will target the exact edge cases where validation, decoding, and routing logic disagree.

What to watch for: Redirect parameters that accept full URLs, repeated parameter names, encoded delimiters, or URL fragments deserve special scrutiny, especially in login, logout, registration, and post-action flows. The safest operational posture is to treat user-supplied redirect strings as hostile input unless they map to a strictly controlled internal destination.