From Frustration to Impact: How a Weekend Hunt Turned into a Crit
The account deletion endpoint accepted a CSRF request that included the user's password in the body, and the password field could be pre-filled with a known value. An attacker could trick a victim into submitting the request, deleting the victim's account.
Published on sarv3shxploit.medium.com
It was a lazy weekend. My mind was clouded with self-doubt.
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
Root cause
Likely the server did not verify that the password submitted with the account deletion request matched the logged-in user's actual password, and it also lacked CSRF protection.
Impact
An attacker could delete a victim's account, causing loss of paid subscriptions, if the victim is tricked into submitting the crafted request.
What the attacker needed
Victim is logged in; victim interacts with a malicious page or file; attacker knows or guesses the victim's password
The fix
The account deletion endpoint should require the correct password and include CSRF protection, such as a token.
How it was found
- Create two test accounts and set both passwords to the same value.
- Generate a CSRF proof-of-concept for the account deletion request.
- Include the attacker's password in the CSRF payload.
- Deliver the payload to the victim (e.g., via a cloned login page and downloaded HTML file).
- The victim's account is deleted when the payload is submitted.
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.
A CSRF attack tricks a logged-in user's browser into sending a request the user did not intend. Here, the account deletion form required the user's password, but the attacker could put any password in the form and the server would accept it, so the victim's account got deleted.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.