root@sparrow:~/writeups$ cat vulnerability-pattern-open-redirect.md
// bug-bounty
Open Redirect
23 Jul 2026
· 1 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
- Browse with Burp open and watch for 301/302/303/307/308 responses.
- Check whether the
header value comes from a controllable parameter.Location - Swap the destination for your own domain and confirm the redirect follows.
- If blocked, try bypasses:
,//evil.com
(browser readshttps://trusted.com@evil.com
as credentials,trusted.com
as the real host),evil.com
, and encoding variants.trusted.com.evil.com - If the endpoint checks the
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.Referer
Hunting checklist
- Found a redirect-carrying parameter returning a 30x
- Confirmed control over the destination
- Tried
and//evil.com
variantstrusted.com@evil.com - 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