Course contentsShow
← Security
Lesson 1141 of 3,05223. Web Security - Modern Web AttacksFree lesson

Open Redirect Fundamentals

Understanding how open redirect vulnerabilities allow attackers to redirect users to malicious sites through trusted domains.

Open Redirect Fundamentals

What you'll learn: How attackers exploit trusted websites to redirect users to malicious destinations, bypassing users' natural caution about suspicious links.

What Is an Open Redirect?

An open redirect vulnerability occurs when a web application accepts user-controlled input to determine a redirect destination without proper validation. Attackers leverage this to create URLs on trusted domains that automatically redirect victims to malicious sites.

Think of it like a trusted courier service that blindly delivers packages wherever the sender writes on the label—even if that address leads to a dangerous location. The victim trusts the courier (your domain), not realizing they're being sent somewhere harmful.

How the Attack Works

Many applications use redirect parameters for legitimate purposes—like returning users to their original page after login:

https://trusted-bank.com/login?redirect=/account/dashboard

If the application doesn't validate the redirect parameter, an attacker can substitute an external URL:

https://trusted-bank.com/login?redirect=https://evil-phishing-site.com

When users click this link, they see the trusted domain in their browser initially, lowering their guard. After authentication (or immediately), they're silently redirected to the attacker's site—often a phishing page that mimics the legitimate service.

Why It's Dangerous

Open redirects exploit trust relationships. Users trained to check URLs before clicking see a legitimate domain and feel safe. This vulnerability becomes particularly powerful when:

  • Combined with phishing campaigns (the trusted URL in emails bypasses filters)
  • Used to steal OAuth tokens through redirect URI manipulation
  • Chained with other attacks like session fixation

Key Takeaway: Open redirect vulnerabilities allow attackers to weaponize trusted domains as launchers for malicious sites, exploiting user trust and bypassing security awareness training by masking malicious destinations behind legitimate URLs.