Any logged in user can delete another user's API tokens
Any logged-in user could reach the delete-credentials endpoint for other users by changing the numeric identifier in the URL. The reporter did not confirm the deletion, but believed the request would be authorised.
Originally disclosed on Mozilla
- Fixed in 37 hours
- Paid in 7 days
- Disclosed after 37 hours
Created attachment 8792747
Example One.PNG
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Steps to reproduce:
Login via Persona at the URL - https://treeherder.mozilla.org/credentials/
You should now be able to login and delete users at links such as the following https://treeherder.mozilla.org/credentials/4/delete/ & https://treeherder.mozilla.org/credentials/9/delete/. You can change the number around until you find a user which is valid.
Due to the sensitivity of the accounts at hand here I haven't clicked "Confirm delete". I am using the request will authorize at this point in time.
Actual results:
Possibility of being able to delete users associated with the application.
Expected results:
Requests should be validated.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the delete endpoint identified the token only by a sequential numeric ID and did not verify that the token belonged to the logged-in user.
Impact
A logged-in user could potentially delete other users' API tokens, though the reporter did not confirm the deletion.
What the attacker needed
A logged-in account
How it was found
- Log in through Persona at the credentials page.
- Open a delete URL containing a numeric identifier.
- Change the number to target other users' credentials.
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 report has not been written yet. The Original tab links to the source.
A website should check that the person asking to delete something actually owns it. Here, the page that deletes API tokens used a number in the address to pick which token to remove, and it did not check that the number belonged to the logged-in user. So someone could try other numbers and potentially delete other people's tokens.
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.