Impostor Admin: Token Edition
A user management system allowed a low-privilege user to delete lists by swapping the bearer token in a delete request to that of a normal user. An attacker with a normal user account could delete any list despite lacking permission.
medium.com
Published on medium.com
Hello Everyone , I hope you all are doing well. Sorry for not posting any blogs here for a while.
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 authenticated the request via the bearer token but failed to enforce role-based authorisation for the delete action.
Impact
A normal user could delete any list, which they were not permitted to do.
What the attacker needed
A normal user account; ability to send crafted requests
How it was found
- Invite a user and give them low privilege so they cannot delete lists.
- With the admin account, initiate a list delete request.
- Change the bearer token to that of the low-privilege user.
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 website had two kinds of accounts: an owner who could delete lists, and a normal user who could only download them. The server checked who you were by a token in the request, but it did not check whether that user was allowed to delete. So anyone could send a delete request with their own normal-user token and the list would be removed.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.