Exploiting a Referer Header for Open Redirect
The login endpoint used the client-supplied Referer header to decide where to redirect after login, without validating it. An attacker could set the Referer to an arbitrary external URL and cause the site to redirect the victim there, enabling phishing or malware delivery.
medium.com
Published on medium.com
Free Article Link: Click for free!
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 redirect users to any domain they control, which could be used for phishing, malware delivery, or bypassing referer-based security checks.
What the attacker needed
Ability to intercept and modify requests; victim must submit a login request with a crafted Referer
The fix
The application should validate the redirect destination against a server-side allowlist and avoid using client-controlled headers like Referer for redirection decisions.
How it was found
- Visit the login page at the admin subdomain.
- Intercept the login request with a proxy tool.
- Change the Referer header to an external URL.
- Submit the request and observe the redirect 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.
An open redirect is when a website sends you to another site based on a link or value you provide, without checking that the destination is safe. Here, the site trusted a header called Referer, which the browser sends to say where you came from, but which an attacker can set to anything. By changing that header, the attacker made the trusted site bounce users to a malicious page.
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.