How Trusting a Request Header Turned a Password Reset Into Account Takeover
The password reset link was built using the client-supplied Host header, so an attacker could change that header to their own domain and have the reset email contain a link to the attacker's server. When the victim clicked the link, the valid reset token was sent to the attacker, who could then set a new password and take over the account.
Bug Bounty
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.
Context
Mavenlink's password reset feature needed to email users a working link back to the reset page. Somewhere in that code, instead of hardcoding the company's own known domain into the link, the application built the link using whatever domain was sitting in the Host header of the request that triggered the reset. On every normal request, from a normal browser, pointed at the real site, the Host header says exactly what you would expect it to say anyway, which is why the shortcut looks harmless.
The finding was paid $1,500 and picked up 33 upvotes on disclosure. The public report is titled Password reset link injection allows redirect to malicious URL.
Setup
The only tool the report names is Burp Suite, used to intercept the reset request and change the Host header before letting it continue on to Mavenlink. The test used a real account and a server the researcher controlled. No versions, endpoints or parameter names are given in the report.
Finding it
Every HTTP request carries a Host header, a simple field telling the server which domain the client thinks it is talking to. It exists because a single server can host many different websites behind one IP address, and the server needs some way to know which one you actually meant to reach.
The detail that makes this entire bug class possible is that the header is just a piece of text the client sends, completely under the client's own control, no different from any other request header you could type by hand. A browser fills it in automatically and honestly almost all the time, which is exactly why most developers never stop to think of it as user input at all. It is, every single time, and nothing stops anyone from setting it to whatever they want.

Using the request's own host to build a relative-feeling absolute URL saves having to hardcode a domain string somewhere. The shortcut only becomes a vulnerability the moment someone realises that header was never actually guaranteed to say what you expect.
Exploitation
Step 1: trigger a reset with a forged Host header
Cable submitted a password reset request for a real account, using Burp Suite to intercept the request first and change the Host header to a server he controlled before letting it continue on to Mavenlink. The report does not reproduce the raw request.
Step 2: observe that the reset still works
The reset still processed normally server-side. A valid token got generated, and an email went out through Mavenlink's own real mail infrastructure to the actual account holder, exactly as the legitimate flow intends. The only thing that changed was the domain baked into the link inside that email, which now pointed at Cable's own server instead of Mavenlink's.

Step 3: the victim clicks the link
If the account holder clicks that link, their own browser sends the valid reset token straight to the attacker's server as part of the request, sitting there readable in the attacker's own access logs.
Step 4: use the captured token
From there, the attacker takes that captured token, browses to Mavenlink's actual real reset page directly, and sets a brand new password on an account that was never theirs to begin with.
Root cause
The application built the reset link from the Host header of the request that triggered the reset instead of hardcoding the company's own known domain. The header is client-controlled on every request, so the value embedded in the emailed link is attacker-chosen.
The mechanism explains why this is more dangerous than a lot of reflected-input bugs. The email itself is completely genuine, sent from Mavenlink's own infrastructure, with Mavenlink's own branding, landing in the real account holder's real inbox exactly when they would expect it to if they had actually requested a reset, or even if they had not, since the attacker is the one who triggered it on their behalf. Every signal a person normally uses to judge whether an email is a phishing attempt, the sending domain, the visual branding, the fact that it arrived through a channel they already trust, checks out completely. The only compromised piece is a URL inside it that most people never actually read character by character before clicking.
The skill in the finding was not knowing that Host headers can be spoofed, which is widely documented. It was connecting that header-trust issue specifically to a feature where the server's output does not stay on the server, but gets mailed out to someone else entirely and trusted implicitly because of where it came from. A reflected Host header showing up in a page you are looking at yourself is a curiosity. The exact same reflected value getting embedded into a credential-bearing link mailed to a different person under your own company's trusted name is a full account takeover chain. Recognising that distinction, which feature's output actually crosses a trust boundary to reach someone else, is the manual reasoning step no scanner reliably makes on its own, because it requires understanding the business purpose of the feature, not just the shape of the request.

Impact
An attacker who can trigger a reset for a victim's account can cause a genuine Mavenlink email carrying a valid reset token to be delivered to that victim, with the link pointing at the attacker's server. If the victim clicks it, the token lands in the attacker's access logs, and the attacker can then set a new password on the victim's account. The chain depends on the victim clicking the link; the report does not describe any way to complete it without that click.
Fix
The report does not say what was changed. The fix implied by the root cause is to stop building the reset link from the request's Host header and use the application's own known domain instead.
Variants to test
Any time you find a header, a parameter, or any piece of client-controlled input reflected back into the application's own output, do not stop at confirming the reflection and move on. Ask specifically whether that output ever leaves the session you are sitting in:
- An email sent to someone else. A positive result is a genuine message from the target's own infrastructure whose link or body carries your injected value, and a click that delivers a credential or token to you.
- A PDF generated and stored for later. A positive result is the injected value appearing in a document another user later downloads and trusts.
- A webhook fired to a third party. A positive result is the injected value reaching a receiver outside the target's trust boundary.
- A cached response served to a different visitor entirely. A positive result is your reflected value being served to another user's session.
A reflection that stays contained to your own browser tab is a data point. The exact same reflection, the moment it crosses into something another person will see and trust later, is very often the difference between an informative finding and a full account takeover.
What happened, in plain words
Mavenlink is a website with user accounts and a password reset feature. Like almost every website with user accounts, it has a "forgot password" feature: you type in your email address, and the site sends you an email containing a special link. Clicking that link lets you set a new password.
Jack Cable, a security researcher, found that Mavenlink built that link using a piece of text supplied by whoever asked for the reset, rather than using its own fixed domain name. That piece of text is called the Host header, and it is part of every request your browser sends to a website. Because the researcher could control it, he could make Mavenlink send a genuine email to a real user whose reset link pointed at a server he controlled. If the user clicked it, the secret code inside the link (the reset token) would be sent to his server, and he could then use it to set a new password on that user's account.
The finding was paid $1,500 and picked up 33 upvotes on disclosure. The public report is titled Password reset link injection allows redirect to malicious URL.

This is a classic web bug, different from the IDOR and race condition issues covered earlier in the same series. It is worth studying because the mistake is easy to make and the result is serious.
The background you need
Before walking through the attack, here are the basic ideas, explained from scratch.
What a request and a response are
When you type a web address into your browser and press Enter, your browser sends a message to a computer somewhere on the internet asking for a page. That message is called an HTTP request. The computer answers with a message containing the page, called an HTTP response. Every time you click a link, submit a form, or load an image, your browser is sending requests and receiving responses.
A request is made of several parts:
- The method (such as
GETto fetch something orPOSTto send data). - The path, which identifies the page or feature you want, for example
/password/reset. - Headers, which are extra labelled pieces of information, like a label on a parcel.
- An optional body, which carries data you are submitting, such as your email address in a form.
What the Host header is
Every HTTP request carries a Host header. It is a simple field telling the server which domain the client thinks it is talking to. It exists because a single server can host many different websites behind one IP address, and the server needs some way to know which one you actually meant to reach.
Think of a large office building with one street address but many companies inside. The street address is the IP address; the company name on the envelope is the Host header. The mail room needs the company name to deliver the letter to the right office.
The detail that makes this entire bug class possible is that the header is just a piece of text the client sends, completely under the client's own control, no different from any other request header you could type by hand. A browser fills it in automatically and honestly almost all the time, which is exactly why most developers never stop to think of it as user input at all. It is, every single time, and nothing stops anyone from setting it to whatever they want.

What a password reset token is
When you ask a website to reset your password, the site cannot simply let anyone change the password for any account, or anyone could take over anyone else's account. Instead it creates a token and emails you a link containing that token. When you click the link, your browser sends the token back to the site. The site checks that the token is valid, and only then lets you set a new password.
The token is like a temporary key that opens one specific door. Whoever holds the key can open the door, so the key must only reach the rightful account holder.
What Burp Suite is
Burp Suite is a tool used by security researchers. It sits between your browser and the website, letting you see every request your browser sends and every response it receives. You can pause a request before it reaches the site, change any part of it, and then let it continue. In this case, the researcher used Burp Suite to intercept the password reset request and change the Host header before letting it continue on to Mavenlink.
Finding the bug
Mavenlink's password reset feature needed to email users a working link back to the reset page. Somewhere in that code, instead of hardcoding the company's own known domain into the link, the application built the link using whatever domain was sitting in the Host header of the request that triggered the reset.
On every normal request, from a normal browser, pointed at the real site, the Host header says exactly what you would expect it to say anyway, which is why the shortcut looks harmless. Using the request's own host to build a relative-feeling absolute URL saves having to hardcode a domain string somewhere. The shortcut only becomes a vulnerability the moment someone realises that header was never actually guaranteed to say what you expect.
Exploitation, step by step
Step 1: trigger a reset with a forged Host header
Cable submitted a password reset request for a real account, using Burp Suite to intercept the request first and change the Host header to a server he controlled before letting it continue on to Mavenlink. The report does not reproduce the raw request.
Why this step matters: the researcher needed the site to generate a reset email while believing it was running on his own server's domain. By changing the Host header, he made the site build the link with his domain instead of Mavenlink's.
Step 2: observe that the reset still works
The reset still processed normally server-side. A valid token got generated, and an email went out through Mavenlink's own real mail infrastructure to the actual account holder, exactly as the legitimate flow intends. The only thing that changed was the domain baked into the link inside that email, which now pointed at Cable's own server instead of Mavenlink's.

Why this is important: the email is completely genuine. It comes from Mavenlink's real mail system, with Mavenlink's branding, and lands in the real account holder's inbox. Every signal a person normally uses to judge whether an email is a phishing attempt, the sending domain, the visual branding, the fact that it arrived through a channel they already trust, checks out completely. The only compromised piece is a URL inside it that most people never actually read character by character before clicking.
Step 3: the victim clicks the link
If the account holder clicks that link, their own browser sends the valid reset token straight to the attacker's server as part of the request, sitting there readable in the attacker's own access logs.
Why this works: the link in the email points at the attacker's server, and the token is part of the link. When the browser follows the link, it sends the token to whoever owns that server. The attacker only needs to look at the requests his server receives to find the token.
Step 4: use the captured token
From there, the attacker takes that captured token, browses to Mavenlink's actual real reset page directly, and sets a brand new password on an account that was never theirs to begin with.
Why this completes the takeover: the token is valid on Mavenlink's real site. The attacker uses the captured token on Mavenlink's real reset page.
Why the bug works
The application built the reset link from the Host header of the request that triggered the reset instead of hardcoding the company's own known domain. The header is client-controlled on every request, so the value embedded in the emailed link is attacker-chosen.
The mechanism explains why this is more dangerous than a lot of reflected-input bugs. A reflected-input bug is one where something you typed or sent comes back to you in the page you are looking at. That is often just a curiosity. Here, the reflected value does not stay on the server; it gets mailed out to someone else entirely and trusted implicitly because of where it came from.
The skill in the finding was not knowing that Host headers can be spoofed, which is widely documented. It was connecting that header-trust issue specifically to a feature where the server's output does not stay on the server, but gets mailed out to someone else entirely and trusted implicitly because of where it came from. A reflected Host header showing up in a page you are looking at yourself is a curiosity. The exact same reflected value getting embedded into a credential-bearing link mailed to a different person under your own company's trusted name is a full account takeover chain. Recognising that distinction, which feature's output actually crosses a trust boundary to reach someone else, is the manual reasoning step no scanner reliably makes on its own, because it requires understanding the business purpose of the feature, not just the shape of the request.

Impact
An attacker who can trigger a reset for a victim's account can cause a genuine Mavenlink email carrying a valid reset token to be delivered to that victim, with the link pointing at the attacker's server. If the victim clicks it, the token lands in the attacker's access logs, and the attacker can then set a new password on the victim's account. The chain depends on the victim clicking the link; the report does not describe any way to complete it without that click.
Fix
The report does not say what was changed. The fix implied by the root cause is to stop building the reset link from the request's Host header and use the application's own known domain instead.
Variants to test
Any time you find a header, a parameter, or any piece of client-controlled input reflected back into the application's own output, do not stop at confirming the reflection and move on. Ask specifically whether that output ever leaves the session you are sitting in:
- An email sent to someone else. A positive result is a genuine message from the target's own infrastructure whose link or body carries your injected value, and a click that delivers a credential or token to you.
- A PDF generated and stored for later. A positive result is the injected value appearing in a document another user later downloads and trusts.
- A webhook fired to a third party. A positive result is the injected value reaching a receiver outside the target's trust boundary.
- A cached response served to a different visitor entirely. A positive result is your reflected value being served to another user's session.
A reflection that stays contained to your own browser tab is a data point. The exact same reflection, the moment it crosses into something another person will see and trust later, is very often the difference between an informative finding and a full account takeover.
Glossary
- HTTP request: A message your browser sends to a website asking for a page or sending data.
- HTTP response: The message a website sends back to your browser.
- Header: An extra labelled piece of information attached to a request or response, like a label on a parcel.
- Host header: The part of a request that tells the server which domain the client thinks it is talking to.
- IP address: A numeric address that identifies a computer on the internet.
- Domain: A human-readable name for a website, such as example.com.
- Token: A long random string used to prove you are allowed to do something, such as reset a password.
- Password reset token: A token emailed to a user so they can set a new password.
- Burp Suite: A tool that lets you intercept, inspect and modify requests between your browser and a website.
- Reflected input: Data you send that the website echoes back in its response.
- Reflected-input bug: A bug where reflected input causes harm, for example by being trusted by someone else.
- Account takeover: Gaining control of someone else's account, usually by changing their password.
- Trust boundary: The line between parties who trust each other and parties who do not; data crossing it must be handled carefully.
- Access logs: Records a server keeps of the requests it receives.
- Webhook: An automatic message one system sends to another when something happens.
- Cache: A stored copy of a response kept to serve future requests faster.
- Vulnerability: A weakness in a system that can be exploited to cause harm.
- Exploit: The act of using a vulnerability to achieve an effect.
- Phishing: A trick where an attacker sends a fake message to steal information.
- Scanner: A tool that automatically checks for common vulnerabilities.