Case file · WS-URL-0417
Subject: “Password reset” SMS → branded login host → unfamiliar landing
Question we kept asking: why does a trusted hostname hand the browser to somewhere else?
This is not a vendor roundup. It is the walk-through we wish more on-call notes looked like.
09:14 — The bait arrives looking finished
The message was tidy. Logo-ish wording. A single link. Hostname on first glance belonged to “us” — or close enough that a tired thumb would not argue.
Nobody pasted it into a browser first. Good. Someone pasted it into a notepad and stared at the query string until the % characters started to feel personal.
That is the whole job, sometimes: refuse the courtesy click.
09:19 — The hostname was a costume; the parameter was the plot
Stripped of tracking junk, the interesting part looked like this shape:
https://login.example.com/oauth/callback
?next=https%253A%252F%252Fevil.test%252Fphish
&return_to=%2Fhome
#continue=https%3A%2F%2Fphish.test%2F
Read it out loud once:
- User lands on a familiar login host
- App reads
next/continue/return_toas “where to send them after” - Value is not a path — it is another origin, sometimes double-encoded so casual eyes see soup
- Fragment (
#…) carries a second redirect-shaped gift for client-side routers
If your callback trusts that blindly, you did not build OAuth. You built a branded trampoline.
09:27 — What “open redirect” means when humans are in the loop
Engineers argue about whether an open redirect is “critical.” Phishing crews do not. They care that:
- the first hostname survives corporate URL filters and user intuition
- the second hostname collects the password, token, or consent click
- screenshots of the address bar still show something the victim recognizes for half a second too long
Severity is not only CVSS. Severity is how much trust you borrowed from your own domain.
09:41 — Unzipping beats debating
We ran the same string through the URL / Redirect Inspector — not because a tool replaces thinking, but because nested percent-encoding is rude at 9 a.m. Demo shape: nested next=, fragment continue=, Risk F as local heuristic — live hops may say unreachable; the URL is still the story.
Two things mattered in the output:
- Risk stayed honest about being heuristic when the demo host could not be followed live. Unreachable ≠ “safe.” It means “we only have the URL itself.”
- Nested decode surfaced
https://evil.test/...after more than one pass. That is the part people miss when they only glance at the raw query.
If your mental model is “either the site is up and evil, or the link is fine,” you will miss the entire class.
10:05 — The boring fixes that end the case
We did not write a novel. We wrote acceptance rules:
For redirect parameters (next, return_to, continue, redirect_uri, …)
- allow relative paths on your origin, or an explicit allowlist of absolute URLs
- reject
//evil,\\evil,javascript:,data:, and userinfo tricks (user@host) - decode iteratively in tests; attackers will encode twice on purpose
- treat fragments as hostile input if your frontend reads them for navigation
For humans triaging links
- decode before you click
- ask “who controls the final origin?” not “who owns the first label?”
- if marketing needs tracked redirects, give them a signed, server-side hop — not an open query param
10:18 — Closing the file
The breach fantasy is a zero-day. The weekday reality is a parameter named next and a user who trusts your hostname more than your engineering review did.
Open redirects are not glamorous. They are how glamour gets laundered.
If you only remember one habit: when a URL looks like your house, check whether the query string is holding someone else’s keys.
Try the same habit on a real string with URL / Redirect Inspector — local signals first, live chain when the host actually answers.