Skip to content
Info disclosure Disclosed report Intermediate

Information disclosure (reset password token) and changing the user's password

A password reset page leaked the reset token to third-party sites through the Referer header when the user clicked an external link. Anyone controlling the linked site could read the token and use it to set a new password for the victim's account.

dawidczagan Follow

Originally disclosed on HackerOne

Bounty$100 View original
  • Triaged in 33 hours
  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 34 days

The user gets an e-mail with password recovery link, which includes reset password token. The user clicks this link and is expected to enter a new password twice. Before entering the password the user clicks a link to a picture (https://xkcd.com/936/). When this happens, cross-domain referer leakage takes place.

GET /936/ HTTP/1.1 Host: xkcd.com User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: pl,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Referer: https://hackerone.com/users/password/edit?reset_password_token=HERE_IS_THE_VALUE_OF_RESET_PASSWORD_TOKEN Connection: keep-alive

It allows the person who has control of xkcd.com to change the user's password (CSRF attack), because this person knows reset password token of the user, uses a new user's password of his choice and authenticity_token is not needed to make it happen.

The original report as published on HackerOne, by dawidczagan. 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 reset token was placed in the page URL as a query parameter, so the browser sent it in the Referer header to any external site the user visited from that page.

Impact

A party controlling the external site could learn the token and change the victim's password, taking over the account.

What the attacker needed

Victim opens the reset link; victim clicks an external link on that page; attacker controls the linked site

How it was found

  1. The user requests a password reset and receives an e-mail with a reset link containing the token.
  2. The user opens the reset link and lands on the page asking for a new password.
  3. Before submitting, the user clicks a link to an external picture site.
  4. The browser sends the reset page URL, including the token, in the Referer header to that 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 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 site which page you came from. Here the page you came from was the password reset page, and its address contained a secret code that lets someone set a new password. So the other website learned the secret code and could 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 dawidczagan

View all

9 more disclosed reports, best first.

More from HackerOne

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.