root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat vulnerability-pattern-open-redirect.md
// bug-bounty

Open Redirect

23 Jul 2026 · 2 min read

What it is

The app takes a URL as a parameter and redirects the user to it without validating it properly —

GET /redirect?url=https://trusted.com
becomes
GET /redirect?url=https://attacker.com
and the app happily sends the user there.

Why it matters

It looks trivial but it isn't: the link starts with a legitimate domain, which is exactly what makes it convincing for phishing, and it chains well with OAuth abuse, credential theft, and login-redirect flows.

Where to look

  • Parameters named
    url=
    ,
    redirect=
    ,
    next=
    ,
    return=
    ,
    continue=
    ,
    dest=
    ,
    redirect_uri=
  • Endpoints like
    /login
    ,
    /logout
    ,
    /sso
    ,
    /tracking
    ,
    /click

How I test it

  1. Browse with Burp open and watch for 301/302/303/307/308 responses.
  2. Check whether the
    Location
    header value comes from a controllable parameter.
  3. Swap the destination for your own domain and confirm the redirect follows.
  4. If blocked, try bypasses:
    //evil.com
    ,
    https://trusted.com@evil.com
    (browser reads
    trusted.com
    as credentials,
    evil.com
    as the real host),
    trusted.com.evil.com
    , and encoding variants.
  5. If the endpoint checks the
    Referer
    header, remember the browser sends it automatically when a victim clicks a link placed somewhere inside the platform itself (a bio, a comment, a public field) — the Referer check alone proves nothing.

Hunting checklist

  • Found a redirect-carrying parameter returning a 30x
  • Confirmed control over the destination
  • Tried
    //evil.com
    and
    trusted.com@evil.com
    variants
  • Tried encoding and double-encoding
  • Checked whether Referer validation is actually being bypassed by hosting the link inside the platform
  • Captured a screenshot of the browser landing on the external domain

Evidence to collect

  • Vulnerable URL
  • Vulnerable parameter
  • Payload used
  • HTTP response with the Location header
  • Screenshot of the browser landing on the external domain
  • Realistic impact — phishing, OAuth abuse, login redirect

Recommended fix

  • Never trust the Referer header for this
  • Validate with a real URL parser, compare the hostname exactly — not a substring/contains check
  • Strict allowlist
  • Reject URLs containing credentials (
    @
    )
  • Prefer internal IDs over full URLs where possible