How I Bypassed Open Redirect Validation in a Logout Endpoint
A logout endpoint accepted a hidden referer parameter and redirected users to whatever URL it contained. The application only checked that the supplied URL contained the target domain name, so a URL using the target domain as a subdomain of an attacker-controlled domain passed the check and redirected victims to the attacker's site.
medium.com
Published on medium.com
Open redirect is a Vulnerability that allow attacker to redirect users to a malicious site through a trusted domain .
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
Impact
An attacker could send victims from a trusted domain to an attacker-controlled site, which could support phishing, credential theft, social engineering, malware distribution and bypassing URL trust filters.
What the attacker needed
Victim clicks a crafted link
The fix
The application should validate redirect destinations against an allow list of trusted domains, reject external URLs and check the actual host name properly.
How it was found
- Find the logout functionality on the target and note it has no visible parameters.
- Use a parameter discovery tool drawing on archived sources to look for hidden or previously used parameters.
- Identify a referer parameter among the discovered parameters.
- Manually request the logout endpoint with the referer parameter and try common redirect payloads, which are all blocked.
- Craft a URL that places the target domain as a prefix of an attacker-controlled domain and supply it in the parameter, which redirects successfully.
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.
An open redirect is when a website takes a link from the address bar and sends the visitor on to that link. Because the link starts with the real site's name, people trust it, but it can land them on a fake login page. Here the site tried to block this by checking the link contained its own name, but a trick address that merely starts with that name slipped through.
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.