Exploiting Unconventional Open Redirects by Manipulating URL Parsing
Some web servers and reverse proxies misparse a URL path containing double slashes, treating the segment after the slashes as the host and returning a redirect to that external domain. An attacker could craft links on a trusted domain that send users to a phishing or malware site.
Published on medium.com
While a website may initially appear secure against common web-based vulnerabilities, this perception can be misleading. In many cases, misconfigurations in the web server can introduce unforeseen security gaps.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server or reverse proxy parses the path after double slashes as an authority (host) component and issues a redirect to it, instead of treating it as a plain path.
Impact
Users who trust the original domain could be redirected to an attacker-controlled site for phishing, credential harvesting or malware delivery.
What the attacker needed
Victim clicks a crafted link; server or proxy misparses double slashes
The fix
Servers should validate incoming URLs for unexpected patterns, normalise away redundant slashes and encoded characters, and only redirect to hosts on a trusted allowlist.
How it was found
- Send a request to the trusted host with a path beginning with double slashes followed by an external domain.
- Observe the server return a 302 redirect pointing at the external domain.
- Follow the redirect and note the client ends up on the external domain.
- To bypass a double-slash filter, send a path with an encoded line feed before the slash.
- Observe the server strip the encoded character, leaving double slashes, and again return a 302 to the external domain.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web address has a part that names the site and a part that names the page. Some servers get confused when the page part starts with two slashes and treat the next word as a new site name, so they tell the browser to go there instead. An attacker can use this to make a link that looks like it belongs to a trusted site but actually sends the visitor somewhere else.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.