CSRF Exploit Leading to Account Takeover (ATO)
The account details form lacked a CSRF token, so an attacker could make a logged-in victim submit a request that changed the victim's email address. The attacker could then use the password reset flow to take over the account.
medium.com
Published on medium.com
In this writeup, I’ll walk you through a recent vulnerability I discovered in a VDP hosted by example.com (for the sake of confidentiality). The vulnerability I found was a Cross-Site Request Forgery (CSRF) flaw, which ultimately led to an Account Takeover (ATO).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could change a victim's account details and then reset the password, leading to full account takeover.
What the attacker needed
Victim is logged in; victim visits attacker's page
How it was found
- Register and log in to the site, then inspect the account details form.
- Notice that the form submission request contains no CSRF token.
- Create a malicious HTML page that auto-submits a form to the account details endpoint with a new email address.
- Get the victim to visit the malicious page while logged in, causing their email to be changed.
- Use the password reset flow with the new email to 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 write-up 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 account details form had no secret token to prove the request came from the real site, so an attacker could change the victim's email. With the email changed, the attacker could request a password reset and receive the reset link, taking over the account.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.