CSRF in changing password after using reset password link
The reset-password submission endpoint accepted a POST without CSRF protection, so another site could submit a new password for a user who had opened a reset link, changing their password.
- Triaged in 9 hours
- Fixed in 52 days
- Disclosed after 4 months
Summary:
Hey OpenMage, the forgot password page is not protected against CSRF attack which can lead to changing password. Use the below form to test
<html>
<body>
<form action="https://demo.openmage.org/customer/account/resetpasswordpost/" method="POST">
<input type="hidden" name="password" value="password123" />
<input type="hidden" name="confirmation" value="password123" />
</form>
<script>document.forms[0].submit()</script>
</body>
</html>
Steps To Reproduce:
- Go to
https://demo.openmage.org/customer/account/forgotpassword/ - Enter your email and ask for password reset link
- Load the password reset link and after loading it close it
- Now load the above form and boom, password will be changed.
Impact
Password reset via CSRF
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-password submission endpoint lacked a CSRF token or any other check tying the request to the user's session.
Impact
An attacker could change a victim's password, provided the victim had already opened a reset link.
What the attacker needed
Victim has opened a reset link; victim visits attacker page
How it was found
- Open the forgot password page on the demo site.
- Enter your email address and request a reset link.
- Open the reset link, then close it.
- Load the attacker's form page, which submits the new password and changes it.
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 reset a password, the site normally gives you a one-time link. This report says the final step that saves the new password did not check that the request really came from the site's own form. So a malicious page could quietly send the same request for you, and your password would be replaced with one the attacker chose.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.