Skip to content
Account takeover Disclosed report Intermediate

Password reset link injection allows redirect to malicious URL

The password reset feature built the reset link using the request's Host header, so an attacker who changed that header could make the emailed link point to their own domain. If the victim clicked it, the reset token would be sent to the attacker's server, letting the attacker reset the victim's password.

cablej Follow

Originally disclosed on HackerOne

  • Triaged in 2 hours
  • Fixed in 3 days
  • Paid in 3 days
  • Disclosed after 53 days

Summary by the program

@cablej found a vulnerability in our password reset functionality that allowed an attacker using an HTTP request with a modified Host header to cause a password reset link to be emailed to the target user that would navigate to the attacker's domain. Because the password reset emails are sent from the Mavenlink email infrastructure, this email, while unexpected by the user, could appear to be legitimate. As a result the user's account could be compromised if they were convinced to enter their login details on the attacker's website.

Summary by the researcher

Modifying the Host header in Mavenlink's password reset functionality would inject an attacker's link into the password reset email. When clicked, this would send the password reset token to the attacker's server, allowing for the attacker to reset the target's password.

Blog post: https://lightningsecurity.io/blog/host-header-injection/

Thanks to Mavenlink for the quick response and bounty!

The original report as published on HackerOne, by cablej. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Mavenlink's password reset feature sends an email to a user who has asked to reset their password. The email contains a link that carries a password reset token; following the link lets the user set a new password. The program's summary describes the emails as being sent from the Mavenlink email infrastructure, which matters for the impact: a message generated and delivered by that infrastructure can look legitimate even when its contents were influenced by an attacker.

The vulnerability reported by @cablej is a Host header injection in that reset flow. By sending the password reset request with a modified Host header, an attacker could cause the reset link in the email to point at the attacker's domain instead of Mavenlink's.

Setup

The report does not describe accounts, roles, tools or software versions. The attack also depends on the victim clicking the link in the resulting email and entering their login details on the attacker's site, as described in the program's summary.

Finding it

The researcher's summary states the observation directly: modifying the Host header in Mavenlink's password reset functionality would inject an attacker's link into the password reset email. When the host portion of that URL is taken from the incoming request, the value the client supplies ends up inside an email that the application itself sends.

That is what makes the behaviour worth reporting: the email is not a phishing message from an outside server, it is a genuine Mavenlink email whose link has been redirected to an attacker-controlled destination.

Exploitation

Step 1: Request a password reset with a modified Host header

The attacker sends the password reset request for the target user's address, replacing the Host header with a domain they control. The report does not include the raw request, the endpoint path, the parameter names or the exact header value used, so the precise request cannot be reproduced from the text alone. What the report does establish is the mechanism: the Host header supplied by the attacker is what ends up in the generated link.

Step 2: The application sends the email

Mavenlink's password reset functionality generates the reset email and sends it through the Mavenlink email infrastructure. The link inside it now points at the attacker's domain, carrying the password reset token as part of the URL.

Step 3: The victim clicks the link

The user receives an email that appears to come from Mavenlink and follows the link. Because the destination is the attacker's server, the request delivers the password reset token to the attacker.

Step 4: The attacker resets the password

With the token in hand, the attacker can complete the reset flow and set a new password for the target account, taking it over. The researcher's summary describes exactly this chain: the token is sent to the attacker's server, allowing the attacker to reset the target's password.

The program's summary describes a second path to the same outcome: if the user is convinced to enter their login details on the attacker's website, the account can be compromised that way instead. Both paths rely on the victim trusting the email because it genuinely originated from Mavenlink's infrastructure.

Root cause

The reset link is constructed from data in the incoming request, specifically the Host header, rather than from a fixed base URL configured by the application. Any client can set that header, so the value is attacker-controlled. The application then places it into an email that it signs, sends and delivers itself, which gives the attacker's URL the credibility of the real sender.

The report does not describe any validation of the header or other defence.

Impact

An attacker who knows a victim's email address can trigger a reset email whose link leads to the attacker's domain. If the victim clicks it, the reset token reaches the attacker and the account can be taken over by resetting the password. Alternatively, if the victim is persuaded to enter their credentials on the attacker's site, the account is compromised that way.

The attack requires the victim to interact with the email, and the report's framing keeps that condition: the account could be compromised if the user were convinced to follow the link or enter their details.

Fix

Variants to test

  1. Other transactional emails. Trigger verification, invitation, notification and receipt emails and watch whether links in them reflect a modified Host header. A positive result is an email whose link host matches the value you supplied.
  2. Other headers used to build URLs. Try X-Forwarded-Host, X-Forwarded-Server and similar forwarding headers where a proxy sits in front of the application. A positive result is the same substitution appearing in the generated link.
  3. Absolute URL parameters. Where a reset or login flow accepts a redirect or return URL, test whether it can be pointed off-site. A positive result is a link in an email, or a redirect after authentication, that lands on your domain.
  4. Token leakage in the referrer. If the reset page loads third-party resources, check whether the token-bearing URL leaks in the Referer header. A positive result is your own listener receiving the token.

Hunting notes

This class of bug hides in any feature where the server composes an absolute URL that leaves the application: password reset, email verification, invitations, share links and notification emails. During recon, the useful signals are flows that send email containing a link, and any behaviour suggesting the link's host is dynamic, such as the same email rendering a different host depending on how the request arrived. Testing is cheap: send the request with a Host header pointing at a domain you control and inspect the email that arrives.

The researcher's summary describes the chain from the modified header, through the email sent by Mavenlink's own infrastructure, to the token arriving on the attacker's server and the password being reset. The program's summary repeats the same chain and adds the credential-phishing variant, which is why an email that looks legitimate despite an attacker-controlled link is the core of the case.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

Mavenlink is an online service where teams work together on projects. Like most websites with user accounts, it has a "forgot my password" feature. You type in your email address, Mavenlink sends you an email containing a special link, and clicking that link lets you choose a new password.

The security researcher @cablej found that this feature could be tricked. When your browser asks a website for a page, it sends a small note along with the request saying which website name it is looking for. That note is called the Host header. Normally your browser fills it in automatically and you never see it. But anyone can write their own request by hand and put whatever they like in that note.

Mavenlink was building the password reset link using that note from the request, instead of using its own fixed address. So if an attacker sent the "please reset my password" request with the note saying "the website is attacker.example" instead of "mavenlink.com", Mavenlink would send a genuine email to the victim containing a link that pointed at the attacker's website. The email really came from Mavenlink, so it looked trustworthy. If the victim clicked the link, the secret code inside it (the reset token) would arrive at the attacker's server, and the attacker could then use it to set a new password and take over the account.

The program at Mavenlink confirmed the finding.

Background: the pieces you need to know

Before walking through the attack, here are the basic ideas it relies on. Each one is explained from scratch.

What a password reset feature does

When you forget your password, a website cannot simply tell you what it was, because it does not store your password in a readable form. Instead it offers a reset: you prove you control the email address on the account, and then you are allowed to set a new password. The proof is a token, a long random string that is unique to your reset request. The website emails you a link containing that token. When you click the link, your browser sends the token back to the website, the website checks that it is valid and unused, and then shows you a form to enter a new password.

A useful comparison: a token is like a cloakroom ticket. Whoever holds the ticket can collect the coat. If someone else gets your ticket, they can collect what is yours. That is why the token must only ever travel to the real website.

What an HTTP request and a header are

When your browser loads a page, it sends a message to the server called an HTTP request. The request has a few parts: a method (such as GET or POST), a path (such as /account/reset), and a set of headers. Headers are extra labelled notes attached to the request, like the address block and special instructions on an envelope. One of them, Host, tells the server which website name the browser was trying to reach. It exists because one server machine can host many websites, so the server needs to know which one you meant.

Normally the browser sets Host for you and you never think about it. But the request is just text, and anyone can write their own request with any tool and put any value in that header. The server has no way of knowing whether the value was written by a browser or by a person.

What a domain is

A domain is the human-readable name of a website, such as mavenlink.com. When you click a link, the domain in the link decides which server your browser contacts. If the domain in a link belongs to an attacker, the request goes to the attacker's server, not to Mavenlink.

What the vulnerability class means

This bug is called Host header injection. "Injection" here means that a value supplied by the person making the request is placed into something the application produces, without being checked. In this case the supplied value is the Host header, and the thing produced is the link inside the password reset email. The application treats the header as trustworthy when it is not.

An everyday comparison: imagine a hotel receptionist who writes the return address on outgoing letters by copying whatever the guest says. A guest could say "return to 12 Attacker Street" and the hotel would post a letter that, on the outside, looks like official hotel correspondence but directs replies to the guest's address. The hotel did nothing wrong in sending the letter; the problem is that it copied an unverified detail into it.

Why it matters that the email comes from Mavenlink

The program's summary makes a point that is central to the impact: the password reset emails are sent from the Mavenlink email infrastructure. That means the message is genuinely generated and delivered by Mavenlink. It is not a fake email from an outside server pretending to be Mavenlink. A recipient who checks the sender sees the real thing. The only false part is the link inside, and that is exactly the part a user is being asked to click.

The setup the attack needs

The report does not describe accounts, roles, tools or software versions. The attack also depends on the victim clicking the link in the resulting email and entering their login details on the attacker's site, as described in the program's summary.

Finding it

The researcher's summary states the observation directly: modifying the Host header in Mavenlink's password reset functionality would inject an attacker's link into the password reset email. When the host portion of that URL is taken from the incoming request, the value the client supplies ends up inside an email that the application itself sends.

That is what makes the behaviour worth reporting: the email is not a phishing message from an outside server, it is a genuine Mavenlink email whose link has been redirected to an attacker-controlled destination.

How would someone notice this? The clue is that the link in the email changes depending on how the request was made. If the same reset request produces a link with a different website name when the request carries a different Host value, the application is clearly copying that value rather than using its own address. The report does not describe the exact moment of discovery, but the mechanism it identifies is this copying of request data into the email.

Exploitation, step by step

Step 1: Request a password reset with a modified Host header

The attacker sends the password reset request for the target user's address, replacing the Host header with a domain they control. The report does not include the raw request, the endpoint path, the parameter names or the exact header value used, so the precise request cannot be reproduced from the text alone. What the report does establish is the mechanism: the Host header supplied by the attacker is what ends up in the generated link.

Why this step matters: the attacker is not breaking into Mavenlink's servers. They are simply asking Mavenlink, through its normal public feature, to send an email. The only unusual part is the note attached to the request saying which website name to use. Because the server accepts that note at face value, the attacker's domain is now in the pipeline.

Step 2: The application sends the email

Mavenlink's password reset functionality generates the reset email and sends it through the Mavenlink email infrastructure. The link inside it now points at the attacker's domain, carrying the password reset token as part of the URL.

Why this step matters: this is where the trust is created. The email arrives from Mavenlink's real sending system, so it passes the checks a cautious user might make. The token, the cloakroom ticket, is embedded in the link. Whoever receives the request for that link receives the token.

Step 3: The victim clicks the link

The user receives an email that appears to come from Mavenlink and follows the link. Because the destination is the attacker's server, the request delivers the password reset token to the attacker.

Why this step matters: clicking a link is an ordinary action, and the email gives the user no obvious reason to hesitate. The moment the browser contacts the attacker's domain, the token is in the attacker's hands. The attacker does not need to break any encryption or guess anything; the victim hands the token over by following a link that looks legitimate.

Step 4: The attacker resets the password

With the token in hand, the attacker can complete the reset flow and set a new password for the target account, taking it over. The researcher's summary describes exactly this chain: the token is sent to the attacker's server, allowing the attacker to reset the target's password.

Why this step matters: the token is the proof that the person setting the new password controls the account's email. The attacker now holds that proof, so the website has no way to tell the attacker apart from the real owner. The account is taken over.

The program's summary describes a second path to the same outcome: if the user is convinced to enter their login details on the attacker's website, the account can be compromised that way instead. Both paths rely on the victim trusting the email because it genuinely originated from Mavenlink's infrastructure.

Root cause

The reset link is constructed from data in the incoming request, specifically the Host header, rather than from a fixed base URL configured by the application. Any client can set that header, so the value is attacker-controlled. The application then places it into an email that it signs, sends and delivers itself, which gives the attacker's URL the credibility of the real sender.

In everyday terms: the website asked the visitor "what is your address?" and then wrote that answer on official letterhead without checking it. The fix is to stop asking, or to check the answer against a list of known-good addresses.

Impact

An attacker who knows a victim's email address can trigger a reset email whose link leads to the attacker's domain. If the victim clicks it, the reset token reaches the attacker and the account can be taken over by resetting the password. Alternatively, if the victim is persuaded to enter their credentials on the attacker's site, the account is compromised that way.

The attack requires the victim to interact with the email, and the report's framing keeps that condition: the account could be compromised if the user were convinced to follow the link or enter their details.

Fix

An allowlist, in plain words, is a list of values that are known to be correct, such as the company's own domains. Anything not on the list is rejected. Building the link from a fixed setting is even simpler: the website already knows its own address, so it should use that and never ask the visitor.

Variants to test

These are related places where the same mistake can appear. Each is described with what a positive result looks like.

  1. Other transactional emails. Trigger verification, invitation, notification and receipt emails and watch whether links in them reflect a modified Host header. A positive result is an email whose link host matches the value you supplied.
  2. Other headers used to build URLs. Try X-Forwarded-Host, X-Forwarded-Server and similar forwarding headers where a proxy sits in front of the application. A positive result is the same substitution appearing in the generated link.
  3. Absolute URL parameters. Where a reset or login flow accepts a redirect or return URL, test whether it can be pointed off-site. A positive result is a link in an email, or a redirect after authentication, that lands on your domain.
  4. Token leakage in the referrer. If the reset page loads third-party resources, check whether the token-bearing URL leaks in the Referer header. A positive result is your own listener receiving the token.

A note on the terms in that list. A proxy is a server that sits between visitors and the application and forwards requests; it may add its own headers describing the original request. A redirect is a response that tells the browser to go to a different address. The Referer header is a note the browser attaches when it loads a resource from another site, saying which page it came from; if the page address contains the token, that note can carry the token to a third party.

Hunting notes

This class of bug hides in any feature where the server composes an absolute URL that leaves the application: password reset, email verification, invitations, share links and notification emails. During recon, the useful signals are flows that send email containing a link, and any behaviour suggesting the link's host is dynamic, such as the same email rendering a different host depending on how the request arrived. Testing is cheap: send the request with a Host header pointing at a domain you control and inspect the email that arrives.

"Recon" means the early exploration phase, where you look around an application to see what features exist and how they behave. "Dynamic" means the value changes based on input, rather than being fixed in advance.

The researcher's summary describes the chain from the modified header, through the email sent by Mavenlink's own infrastructure, to the token arriving on the attacker's server and the password being reset. The program's summary repeats the same chain and adds the credential-phishing variant, which is why an email that looks legitimate despite an attacker-controlled link is the core of the case.

Glossary

  • Allowlist: a list of values that are known to be acceptable; anything not on the list is rejected.
  • API: a way for one piece of software to talk to another by sending requests and receiving responses, without a human clicking through pages.
  • Base URL: the fixed starting part of a web address, such as the website name, that the rest of a link is built on.
  • Bounty: a payment made by a company to a researcher who reports a valid security problem.
  • Browser: the program you use to visit websites, such as Chrome or Firefox.
  • Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests.
  • Credential: a username and password, or similar proof of identity.
  • CVSS: a standard scoring system for rating the severity of a security issue.
  • Domain: the human-readable name of a website, such as mavenlink.com.
  • Endpoint: a specific address or path on a website that performs a particular action.
  • Exploitation: the process of actually carrying out an attack using a weakness.
  • Header: an extra labelled note attached to an HTTP request or response, carrying information such as the website name or the type of content.
  • Host header: the header in an HTTP request that says which website name the client is trying to reach.
  • Host header injection: a weakness where an application uses the Host header from the request to build something, such as a link, without checking it, letting an attacker influence that output.
  • HTTP: the set of rules browsers and servers use to exchange requests and responses.
  • HTTP request: the message a browser or tool sends to a server asking for a page or an action.
  • Impact: the harm an attacker could cause by using a weakness.
  • Infrastructure: the systems a company uses to run a service, such as its email sending systems.
  • Injection: placing attacker-supplied data into something the application produces, without checking it.
  • Password reset token: a long random string that proves a person is allowed to set a new password for an account.
  • Phishing: tricking someone into entering their details or clicking a link by pretending to be a trusted party.
  • Proxy: a server that sits between visitors and an application and forwards requests.
  • Recon: the early exploration phase of looking around a system to understand its features and behaviour.
  • Redirect: a response that tells the browser to go to a different address.
  • Referer header: a note the browser attaches when loading a resource from another site, saying which page it came from.
  • Root cause: the underlying reason a weakness exists, as opposed to its symptoms.
  • Severity: a rating of how serious a security issue is.
  • Token: a piece of data that stands in for proof of identity or permission, like a cloakroom ticket.
  • Transactional email: an email sent automatically because of a user action, such as a password reset, invitation or receipt.
  • URL: the address of a page or resource on the web.
  • Validation: checking that a value is acceptable before using it.
  • Vulnerability: a weakness in software that an attacker could use to cause harm.
  • X-Forwarded-Host: a header some proxies add to record the original website name a request was made for.

More by cablej

View all

25 more disclosed reports, best first.

More from Mavenlink

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.