Open-Redirect Through HTTP Parameter Pollution
The login page accepted a 'next' parameter for redirection, but a direct external URL was blocked. By using HTTP parameter pollution, an attacker could craft a URL that caused the application to redirect to an external site after login.
Published on medium.com
At the request of my friend Saigo, I am writing this writeup, of an Open-Redirect that I reported on a long time ago, although it was not considered to have any real-life impact.
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 application used the last occurrence of the 'next' parameter without proper validation, allowing an attacker to override the intended redirect destination.
Impact
An attacker could redirect users to a malicious site after they log in, which could be used for phishing, though the report notes it was not considered to have real-life impact.
What the attacker needed
Victim clicks a crafted login link; victim logs in
How it was found
- Notice that the login URL contains a 'next' parameter with an absolute URL.
- Try changing the 'next' parameter to an external URL, which fails.
- Craft a URL with two 'next' parameters: the first pointing to a legitimate page, the second to an external site.
- After logging in, the application redirects to the external site.
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 you click. Here, the login page had a 'next' parameter to decide where to go after logging in, but it only allowed its own site. The attacker found a trick: by adding the 'next' parameter twice, the site used the second value and sent the user to an attacker-controlled site.
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.