Skip to content
Info disclosure Disclosed report Beginner

Password reset token leak on third party website via Referer header

The password reset page included external footer links that did not suppress the Referer header, so the reset token in the page URL was sent to the third-party site when a user clicked the link. Anyone controlling that third-party site could read the token and use it to reset the victim's password.

akaash_pantherdefence Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 4 hours
  • Disclosed after 5 hours

Hi Security Team,


#Description

It has been identified that the application is leaking referrer token to third party sites. In this case it was found that the password reset token is being leaked to third party sites which is a issue knowing the fact that it can allow any malicious users to use the token and reset the passwords of the victim.

#Steps To Reproduce:-

  1. Request a password reset link for a valid account
  2. Click on the reset link
  3. Before resetting the password click on the github link footer section
  4. You will notice the following request in burpsuit

#REQUEST: GET /rtfd/readthedocs.org HTTP/1.1 Host: github.com User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Referer: https://readthedocs.org/accounts/password/reset/key/1zp5-4pt-8163732eb05d188994ec/ Cookie: COOKIE Connection: close Upgrade-Insecure-Requests: 1

As you can see in the referrer the reset token is getting leaked to third party sites. So, the person who has the complete control over that particular third party site can compromise the user accounts easily.

POC_img.jpg
POC_img.jpg From the original on HackerOne

#Solution: For remediation, you should stop the third party sites to show the referrer header by adding rel="noopener noreferrer" to external links in the footer. or check the reference below.

Ref: https://mathiasbynens.github.io/rel-noopener/


Best Regards Akaash Sharma :)

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the external footer links lacked rel="noopener noreferrer", so the browser sent the full reset-page URL, including the token, in the Referer header to the third-party site.

Impact

A party controlling the third-party site could obtain the reset token and use it to reset the victim's password, though the token is only exposed if the user clicks the external link before completing the reset.

What the attacker needed

A valid account; victim clicks the external footer link; attacker controls the third-party site

The fix

External links on the reset page should be given rel="noopener noreferrer" so the browser does not send the reset URL as a Referer.

How it was found

  1. Request a password reset link for a valid account
  2. Open the reset link
  3. Before resetting the password, click the GitHub link in the footer
  4. Observe the outgoing request to the third-party site carrying the reset token in its Referer header

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 report has not been written yet. The Original tab links to the source.

When you click a link to another website, your browser often tells that website which page you came from, using a piece of information called the Referer header. Here the page you came from was the password reset page, and its web address contained the secret token used to reset the password. So the other website was handed the secret, and whoever runs it could use it to take over the account.

What is Info disclosure?

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

More by akaash_pantherdefence

View all

2 more disclosed reports, best first.

More from Aspen

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.