How I Was Able To Discover Broken Access Control
The login endpoint granted access based on the username supplied in the request rather than properly verifying the token, so changing the login field to 'admin' gave the attacker access as the administrator. The author reports the company rated it critical and paid a bounty.
Published on infosecwriteups.com
I’m Helmi Riahi — a network & systems security engineer who gets weirdly excited about pentesting . Today I want to share a crazy little IDOR I found while hunting .
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 trusted a client-supplied username in the login request instead of validating the authentication token to determine identity.
Impact
An attacker could log in as the administrator account and gain the privileges of that account.
What the attacker needed
A free account; ability to intercept requests
How it was found
- Create and verify a test account on the target site.
- Log in and notice the display name appears inconsistently after refresh.
- Capture the login request in Burp Suite.
- Change the login field value to admin and resend the request.
- Observe that access as admin is granted.
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.
When you log in, the server should check a secret token to decide who you are. Here the server apparently trusted a name the browser sent instead, so anyone could claim to be the admin just by editing that name. That is called broken access control: the site lets you do things you should not be allowed to do.
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.