Skip to content
CSRF Disclosed report Beginner

Account takeover due to CSRF in "Account details" option on █████████

A CSRF vulnerability in the account details page allowed an attacker to change a victim's email address to the attacker's own. The attacker could then use the forgot password feature to reset the victim's password and take over the account.

mik317 Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 3 months
  • Disclosed after 4 months

Summary: Hi DoD team, similarly to the previous CSRF that I've reported, I've found another CSRF in the same domain, but on the Account details option.

Description: The CSRF issue allows me to modify the datas of every victim that is targeted using the CSRF file, and leading to account takeover simply setting my email as email of the victim: logging out I can recover the password of the infected account using the attacker-email that has replaced the victim-email.

Step-by-step Reproduction Instructions

  1. Login as victim and check your infos in the account details
  2. Open the CSRF malicious file
  3. Recheck the infos: now the email is different (also the username)

(In the video the @ char is replaced with %40 (url encoded version of the @ char), but is due to a problem in the CSRF value, simply replacing %40 to @ in the email parameter, the @ char appears).

For account takeover now:

  1. Go in anonymous mode (now you're the attacker that hasn't access to the accounts)
  2. The victim has opened the CSRF file, so your email is setted in the victim's account
  3. Go on the login, and request the Forgot password option, inserting the email used for replace the one of the victim
  4. You obtain a link for reset the password (I've not done a video, but if you can't reproduce the steps I can do one for these steps also :))

Suggested Mitigation/Remediation Actions Use captchas and CSRF-tokens for be sure that the victim is changing the datas knowing that.

Impact

The ██████████████████ShopCart has a POST CSRF issue also in the account details, that can lead to account takeover replacing the email of the victim with the email of the attacker, and requesting a new password using the Forgot password option.

The original report as published on HackerOne, by mik317. 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 account details form lacked CSRF protection (such as a token) and did not verify that the request was intentionally made by the user.

Impact

An attacker could take over a victim's account by changing the victim's email to the attacker's email and then resetting the password, but the attack requires the victim to open a malicious file.

What the attacker needed

Victim opens a malicious file

How it was found

  1. Log in as the victim and note the account details.
  2. Open the malicious CSRF file.
  3. Check the account details again: the email and username have changed.
  4. As the attacker, go to the login page and use the 'Forgot password' option with the attacker's email.
  5. Receive a password reset link for the victim's 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.

CSRF (Cross-Site Request Forgery) is when a malicious website tricks your browser into sending a request to another site where you're logged in, without your knowledge. Here, the attacker made a file that, when opened by the victim, changed the victim's email address to the attacker's email. Then the attacker used the 'forgot password' feature to reset the password and take over the account.

What is CSRF?

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

More by mik317

View all

23 more disclosed reports, best first.

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.