Skip to content
CSRF Disclosed report Beginner

CSRF to account takeover in https://█████/

The account settings page that lets a user change their email address had no CSRF protection, so a malicious page could silently change a logged-in victim's email to one the attacker controls. The attacker could then use the password reset flow to take over the account.

i_hack_everyone Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 33 hours
  • Fixed in 10 days
  • Disclosed after 15 days

Hi DoD team, I found a CSRF to account takeover in https://███████/

NOTE:

Try to open the site in firefox because chrome sometimes is not allowing to open the site.

Summary:

There is no protection against CSRF in changing email which lead to CSRF to account takeover on https://██████/.

Step-by-step Reproduction Instructions

I have made a video POC in which I have shown the account takeover clearly Please do watch for better understanding

  1. Login as victim and check your infos in the account details
  2. Open the CSRF malicious file which I have attached (csrf_POC.html)
  3. Now the email is different (you can also change your name and other fields as well)
  4. Now you can simply takeover the account
  5. All you have to do is click on reset password on main page and enter the email you used to trick the victim and you will get instructions to reset the password. And you can successfully takeover the account

Suggested Mitigation/Remediation Actions

Use captchas and CSRF-tokens for be sure that the victim is changing the datas knowing that.

Impact

It is a critical issue as i was able to takeover anyone account using this attack. This vulnerability is high/critical because I was able to perform account takeover

The original report as published on HackerOne, by i_hack_everyone. 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 email-change endpoint accepted state-changing requests without a CSRF token or other origin check.

Impact

An attacker could take over a victim's account; the reporter notes the site sometimes would not open in Chrome and had to be tested in Firefox.

What the attacker needed

Victim is logged in; victim opens attacker's page; site works in Firefox

The fix

The email-change request should be protected with a CSRF token (and optionally a CAPTCHA) so the change only happens when the user intends it.

How it was found

  1. Log in as the victim and note the account details.
  2. Open the attacker's malicious HTML file in the browser.
  3. Observe that the account email has changed (other fields can be changed too).
  4. Use the password reset on the main page with the attacker's email.
  5. Receive the reset instructions and take over 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, your browser sends your session cookie with every request to that site, even ones triggered by another page. A cross-site request forgery (CSRF) attack tricks your browser into sending a change-email request from an attacker's page, and because the site did not check that the request really came from its own pages, the change went through. The attacker then points the email at their own inbox and uses the normal password reset to get in.

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.