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.
- 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
- Login as victim and check your infos in the account details
- Open the CSRF malicious file
- 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:
- Go in anonymous mode (now you're the attacker that hasn't access to the accounts)
- The victim has opened the CSRF file, so your email is setted in the victim's account
- Go on the login, and request the
Forgot passwordoption, inserting the email used for replace the one of the victim - 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.
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
- Log in as the victim and note the account details.
- Open the malicious CSRF file.
- Check the account details again: the email and username have changed.
- As the attacker, go to the login page and use the 'Forgot password' option with the attacker's email.
- 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.