The “Select-Your-User” Flaw: A Tale of Broken Access Control
A login page had a 'Source' dropdown that let the user pick a profile; selecting one and submitting without valid credentials granted access to that profile's dashboard. An attacker could view sensitive card rates, transaction histories and internal system metrics.
medium.com
Published on medium.com
When we think of web hacking, we often imagine complex SQL injections or sophisticated Cross-Site Scripting (XSS) payloads. However, some of the most critical vulnerabilities are the simplest ones.
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 dropdown value to decide which user's dashboard to show, without verifying that the session was authenticated for that user.
Impact
An attacker could view sensitive card rates, transaction histories and internal system metrics that should have been restricted to authorised personnel.
What the attacker needed
Access to the login page; no valid credentials needed
The fix
The application should never trust client-side input and should verify on the server that the authenticated session is authorised for the specific resource being requested.
How it was found
- Open the login page and inspect the 'Source' dropdown.
- Select a specific option from the dropdown.
- Click Login without entering a valid password for that option.
- Observe that you are logged in and can view that profile's data.
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 login page had a menu where you could choose which account or profile you wanted to use. The server trusted that choice without checking whether you had actually logged in as that person. So by simply picking a name from the menu and pressing login, you could see that person's private information.
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.