How a “Delete Account” Button Became a $12,500 Nuke for an En
The GraphQL delete account mutation only checked the first user_id in a batched request against the JWT, so an attacker could include their own account deletion first to pass authorization and then delete other users' accounts via aliased mutations.
When you think about the most dangerous features on a web application, you usually think of file uploads, password resets, or payment gateways. But there is one button that developers always rush to build at the very end of a sprint, completely ignoring the security implications: “Delete My Account.”
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 authorization middleware only validated the first user_id in a batched GraphQL request and then set a request-wide authorised flag, so subsequent aliased mutations ran without per-operation checks.
Impact
An attacker could delete any user account, and by scripting many aliased mutations, could wipe out large numbers of users and workspaces, bypassing tenant isolation.
What the attacker needed
A valid account on the platform; ability to send crafted GraphQL requests
How it was found
- Intercept the delete account request and drop it to avoid deleting the test account.
- Try deleting a second test account using the first account's token; the server rejects it.
- Try passing an array of user IDs; the server rejects it due to strict type enforcement.
- Send a batched mutation with an alias for the attacker's own account deletion first, then an alias for the victim's account deletion.
- Observe both mutations return success and the victim account is deleted.
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.
GraphQL lets a client ask for several operations in one request by giving each a name (an alias). The server checked only the first operation's user ID against the logged-in user, then ran all of them, so a user could delete other people's accounts by putting their own deletion first.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.