Account Deletion Security Pitfalls — A Bug Bounty Case Study
An account deletion endpoint accepted a single DELETE request authenticated only by a bearer token, with no password re-entry, confirmation or recovery step. Anyone holding a valid token could therefore permanently delete the account it belonged to.
During an API security review, I encountered a design flaw in an account deletion process. The API allowed accounts to be deleted by sending a single HTTP request containing only a bearer token — no secondary checks, no confirmation, and no recovery option.
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 deletion endpoint performed no re-authentication or confirmation step and relied solely on the bearer token for authorisation.
Impact
A stolen bearer token could permanently wipe an account, causing targeted denial of service and data loss; the text notes the finding was made in a sandbox rather than production.
What the attacker needed
A valid bearer token for the target account
The fix
The deletion flow should require re-authentication such as a password or MFA, confirm the authenticated user matches the account, add CSRF protection, delay deletion so it can be reversed, and alert the user.
How it was found
- Create two test accounts, one as victim and one as attacker.
- Review the victim's account deletion request and note it is a DELETE call with no user ID in the URL or body.
- Confirm the deletion succeeds using only the victim's bearer token.
- Swap in the other account's valid token and observe that the linked account is deleted with no further verification.
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 bearer token is a short string a site gives you after login, and whoever holds it is treated as you. Here the delete-account request trusted that token alone, so a stolen token was enough to destroy the account with no extra check. Adding a password or code prompt before deletion would have stopped this.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.