Skip to content
CSRF Disclosed report Beginner CVE-2021-21395

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.

xenx Follow

Originally disclosed on HackerOne

  • 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
<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:

  1. Go to https://demo.openmage.org/customer/account/forgotpassword/
  2. Enter your email and ask for password reset link
  3. Load the password reset link and after loading it close it
  4. Now load the above form and boom, password will be changed.

Impact

Password reset via CSRF

The original report as published on HackerOne, by xenx. 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-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

  1. Open the forgot password page on the demo site.
  2. Enter your email address and request a reset link.
  3. Open the reset link, then close it.
  4. 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.

More by xenx

View all

2 more disclosed reports, best first.

More from OpenMage

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.