How I Deleted Users from the Database on Private Bug Bounty Program
Inviting a user to an organisation and then revoking the invite deleted that user's account from the database. An attacker could delete unverified accounts and accounts created via Facebook login by performing this invite-revoke sequence.
Sharat Kaikolamthuruthil Follow
Published on medium.com
This is a short write-up of a peculiar bug that I found on a private bug bounty program.
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 invite revocation logic deleted the invited user record instead of only removing the pending invitation, affecting accounts without verified email.
Impact
An attacker could delete unverified accounts and accounts created via Facebook login, causing loss of access and data for those users.
What the attacker needed
Owner or admin role in an organisation; target account is unverified or uses Facebook login
How it was found
- Log in as an owner of one organisation in one browser and as a user of another organisation in a second browser.
- Send an invitation from the first owner to the second user.
- Revoke that invitation.
- Observe that the second user is logged out and cannot log in.
- Confirm deletion by registering a new account with the same email address.
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.
The application let an owner invite someone to their organisation and later cancel that invitation. A mistake in the cancellation code also removed the invited person's account entirely, so they could no longer log in and their data was gone. The attacker only needed to send and then cancel an invite to wipe out certain accounts.
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.