Broken Access Control - Unauthorized users able to add customer
A user whose role had been downgraded from admin to member could still add new customers by replaying a previously saved request. The server did not re-check the caller's current role, so a low-privileged user could perform an admin-only action.
medium.com
Published on medium.com
Hallo Semuanya, Perkenalkan nama saya Ahmad Tazkiarni Ramadhan (LinkedIn). Pada kesempatan kali ini, saya akan berbagi cerita bagaimana saya dapat menemukan celah kerentanan Broken access control dimana user dengan tingkat role member dapat memiliki hak akses dengan role admin.
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 authorised the add-customer action based on the request itself rather than re-checking the caller's current role on each call.
What the attacker needed
Two accounts on the platform; ability to change a user's role; ability to capture and replay requests
How it was found
- Create two accounts, one kept as admin and one to be downgraded.
- Capture the add-customer request sent by the admin account.
- Downgrade that account from admin to member through the manage-role feature.
- Resend the captured add-customer request as the member account.
- Observe that the server still returns 201 Created and the customer is added.
- Confirm with the admin account that the new customer exists.
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.
Every user of a website has a role, such as admin or member, and the site is supposed to check that role before letting someone do sensitive things. Here the check was missing on the server, so a member could still add customers by resending an old request that had been captured while the account was still an admin. This is called broken access control: the site trusts the request instead of checking who is really sending it.
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.