Skip to content
Info disclosure Disclosed report Beginner

Leaking Referrer in Reset Password Link

The reset password page leaked the password reset token in the Referer header to external sites when a user clicked an external link on that page.

cliantech Follow

Originally disclosed on HackerOne

Bounty$100 View original
  • Triaged in 3 hours
  • Fixed in 14 hours
  • Paid in 14 hours
  • Disclosed after 30 hours

Summary by the researcher

Clicking on external links within the reset password page leaked password reset token in the referer header.

The report

I have found that you are leaking via the referrer the reset password link. I am attaching the photo as proof of concept that the site is indeed leaking the reset password link via the referrer.

Thats when someone loads the reset password link and decided to click on external links.

Its the time the referrer is leak ( see attached photo )

Clifford Trigo

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is IRCCloud's password reset flow. The researcher, cliantech, reported that the reset password page leaked the password reset token through the Referer header when a user clicked an external link from that page.

The sequence described in the report is short:

  1. A user loads the reset password link, which carries the reset token.
  2. From that page, the user clicks an external link.
  3. The browser sends the full URL of the reset password page, token included, in the Referer header to the external site.

The researcher states that a photo was attached as proof of concept showing the site leaking the reset password link via the referrer, but the report text contains no request, response, header dump or URL, so the exact token format and the external destination are not shown. The report also does not give a severity rating, a CVSS score or a description of the fix.

The platform records the weakness as a violation of secure design principles and a bounty of 100.00 USD, disclosed on 2014-04-12.

Root cause

The report does not describe the cause. In general, a reset page whose URL carries the token and which does not restrict referrer behaviour can leak that URL to other origins. When the user follows a link to another origin, the browser's default referrer behaviour sends the current page URL, including the token, to that origin.

Impact

The leaked value is the password reset token itself. The leaked value is the password reset token itself, which the report treats as the secret that should not leave the site. The report frames the issue around the moment a user clicks an external link while on the reset page. The report does not demonstrate a completed account takeover.

How this kind of bug works

Secret-bearing URLs are common in password reset, email verification, invitation and magic-login flows. The secret sits in the URL because the link has to work without a session. The problem is that URLs are not treated as confidential by browsers: they appear in the Referer header on outbound navigation, in document.referrer on the destination, in proxy and server access logs, in analytics, and in browser history and sync.

The Referer header is governed by the referrer policy. Under older defaults, cross-origin navigations sent the full URL, path and query string included. Modern browsers default to strict-origin-when-cross-origin, which sends only the origin for cross-origin requests, but the behaviour still depends on the policy the site sets and on the browser in use, and same-origin or downgrade cases can differ. Any page that renders a token in its URL and also contains links to third parties is a candidate.

Defences work at several layers: keep the token out of the URL after it has been consumed, set a restrictive referrer policy on the reset page, avoid third-party links and resources on that page, and make tokens single-use and short-lived so a leak has a narrow window.

How to test for it

  1. Start a password reset for an account you control and capture the emailed link. Note whether the token is in the query string, the path, or a fragment. Fragments are not sent in Referer, so they behave differently.
  2. Open the link in a browser with developer tools on the Network tab, or use an intercepting proxy.
  3. Look at the reset page itself: does it load third-party resources (fonts, scripts, images, analytics)? Each cross-origin subresource request carries a Referer derived from the page URL. Check the header on those requests.
  4. Look for outbound links on the page. Follow one to a host you control and inspect the Referer your server receives. A positive result is the reset URL with the token intact.
  5. Repeat with different referrer policies and browsers, since the default has changed over time.

Common false positives: the token appears only in the fragment, so it never reaches the network; the site already sends a policy such as no-referrer or strict-origin-when-cross-origin and only the origin arrives; the token in the header is already expired or single-use and has been consumed by the page load; or the value you see is a non-secret identifier rather than the token that authorises the reset.

How it is fixed

  • Serve the reset page with a restrictive Referrer-Policy, for example no-referrer or same-origin, so the URL is not sent cross-origin.
  • Remove the token from the visible URL once the page has loaded, for example by exchanging it for a session-bound state and redirecting to a clean URL.
  • Avoid third-party content and external links on the reset page.
  • Make tokens single-use, short-lived and bound to the account, so a leaked token has minimal value.
  • Invalidate the token after a successful reset and on any new reset request.

Hunting notes

This bug class hides in any flow where a secret travels in a URL: password reset, email confirmation, invite acceptance, unsubscribe links, magic logins, OAuth callbacks and share links. Recon signals include reset pages that load third-party scripts or fonts, pages with marketing or help links, and applications that reflect the token in the address bar without cleaning it.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

IRCCloud is a web service for connecting to IRC, a text chat system. Like most sites with user accounts, it has a password reset feature: if you forget your password, you ask the site to send you a link by email, and opening that link lets you choose a new password. The link contains a long random value called a token. The token is the proof that whoever opened the link is the person who controls the email address on the account, so it must stay secret.

The researcher, cliantech, found that the reset password page leaked that token through the referrer when a user clicked an external link. The sequence is short:

  1. A user opens the reset password link from the email. The page's address in the browser contains the token.
  2. From that page, the user clicks a link that goes to a different website.
  3. The browser tells the other website which page the user came from. It does this with a small piece of information sent along with the request, called the Referer header, and in this case it included the full address of the reset page, token and all.

The researcher attached a photo as proof of concept, showing the site leaking the reset password link through the referrer. The report itself contains no request, response, header dump or URL, so the exact shape of the token and the external site involved are not shown. It also gives no severity rating, no CVSS score and no description of the fix.

The platform records the weakness as a violation of secure design principles, with a bounty of 100.00 USD, disclosed on 2014-04-12.

The concepts you need

A request is what your browser sends to a web server when you open a page or load anything on it: a short message asking for a file, a page or some data. The server answers with a response. Every request carries small labelled pieces of information called headers, which describe the request, for example what kind of browser is asking.

A cookie is a small value a site stores in your browser so it can recognise you on later requests, for example to keep you logged in. A token here is a different thing: a long random string that acts like a temporary key. In a password reset, the token in the link is what authorises the change, because the link has to work even when you are not logged in.

The Referer header (the name is a historical misspelling of "referrer") is how a browser tells a server "I got here from this page". When you click a link, the request for the new page includes the address of the page you came from. Sites use it for statistics and for understanding traffic. The catch is that browsers treat addresses as non-secret: they will happily pass the full address of the previous page, including anything in it, to the next site.

A query parameter is the part of a web address after a question mark, used to pass values to a page, for example ?id=123. A path segment is one of the slash-separated pieces of the address before the question mark. A fragment is the part after a #, which points at a place inside a page; browsers do not send it in the Referer header, which matters later.

A vulnerability class is a family of bugs that share the same underlying mistake. This one belongs to the family of secrets leaking through URLs.

Why it matters

What leaks is the password reset token itself, the secret the report says should not leave the site.

The report frames the issue around the moment a user clicks an external link while on the reset page. The report does not demonstrate a completed account takeover.

In general, how this kind of bug works

Secrets in URLs are common in password reset, email verification, invitation and magic-login flows. The secret sits in the address because the link has to work without a session. The problem is that browsers do not treat addresses as confidential: they show up in the Referer header on outbound navigation, in document.referrer on the destination page, in proxy and server access logs, in analytics, and in browser history and sync.

How much of the address is sent is controlled by the referrer policy, a setting the site can choose. Under older defaults, cross-origin navigations sent the full address, path and query string included. Modern browsers default to strict-origin-when-cross-origin, which sends only the origin (the scheme and host, such as https://example.com) for cross-origin requests. The behaviour still depends on the policy the site sets and on the browser in use, and same-origin or downgrade cases can differ. Any page that puts a token in its address and also contains links to third parties is a candidate.

Defences work at several layers: keep the token out of the address once it has been used, set a restrictive referrer policy on the reset page, avoid third-party links and resources on that page, and make tokens single-use and short-lived so a leak has a narrow window.

In general, how to test for it

  1. Start a password reset for an account you control and capture the emailed link. Note whether the token is in the query string, the path, or a fragment. Fragments are not sent in Referer, so they behave differently.
  2. Open the link in a browser with developer tools on the Network tab, or use an intercepting proxy (a tool that sits between browser and server and shows every request).
  3. Look at the reset page itself: does it load third-party resources such as fonts, scripts, images or analytics? Each cross-origin subresource request carries a Referer derived from the page address. Check the header on those requests.
  4. Look for outbound links on the page. Follow one to a host you control and inspect the Referer your server receives. A positive result is the reset address with the token intact.
  5. Repeat with different referrer policies and browsers, since the default has changed over time.

Common false positives: the token appears only in the fragment, so it never reaches the network; the site already sends a policy such as no-referrer or strict-origin-when-cross-origin and only the origin arrives; the token in the header is already expired or single-use and has been consumed by the page load; or the value you see is a non-secret identifier rather than the token that authorises the reset.

In general, how it is fixed

  • Serve the reset page with a restrictive Referrer-Policy, for example no-referrer or same-origin, so the address is not sent cross-origin.
  • Remove the token from the visible address once the page has loaded, for example by exchanging it for a session-bound state and redirecting to a clean address.
  • Avoid third-party content and external links on the reset page.
  • Make tokens single-use, short-lived and bound to the account, so a leaked token has minimal value.
  • Invalidate the token after a successful reset and on any new reset request.

In general, where to look

This bug class hides in any flow where a secret travels in a URL: password reset, email confirmation, invite acceptance, unsubscribe links, magic logins, OAuth callbacks and share links. Signals worth watching for include reset pages that load third-party scripts or fonts, pages with marketing or help links, and applications that reflect the token in the address bar without cleaning it.

Glossary

  • Token: a long random string that acts as a temporary key, here proving the right to reset a password.
  • Request: the message a browser sends to a server asking for a page or resource.
  • Response: the server's answer to a request.
  • Header: a labelled piece of information attached to a request or response.
  • Cookie: a small value stored in the browser so a site can recognise you later.
  • Referer header: the header in which the browser reports the address of the page you came from.
  • Referrer policy: the site's setting that controls how much of the address is sent in the Referer header.
  • Origin: the combination of scheme and host, such as https://example.com.
  • Query parameter: a value in the address after a question mark, such as ?id=123.
  • Path segment: one of the slash-separated pieces of an address before the question mark.
  • Fragment: the part of an address after #, pointing inside a page; not sent in Referer.
  • Cross-origin: involving a different origin from the page you are on.
  • Subresource: anything a page loads besides the page itself, such as scripts, fonts or images.
  • Intercepting proxy: a tool that sits between browser and server and shows every request.
  • Proof of concept: a demonstration that the issue is real, here a photo.
  • False positive: a finding that looks like a bug but is not exploitable.
  • CVSS: a standard scoring system for the severity of a vulnerability.
  • Account takeover: an attacker gaining control of someone else's account.

More by cliantech

View all

14 more disclosed reports, best first.

More from IRCCloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.