Breaking Access Control: Logic Manipulation & Role Escalation (Pa
The text describes four access control flaws in a web application: a hidden parameter controlling admin status, a mass assignment issue allowing role changes via profile input, a URL-based access control bypass where a standard user could upgrade their own account, and a method-based bypass in a multi-step upgrade process. An attacker could escalate their privileges to admin.
Published on medium.com
After exploring path manipulation, we move into the core of web vulnerabilities: Business Logic Manipulation and Role Escalation. This is where we stop looking at where we are in the application and start looking at what we can make the server do.
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 application trusted client-supplied parameters for authorization decisions and failed to enforce access control on every step of multi-step processes.
What the attacker needed
A free account; ability to intercept HTTP requests
The fix
Authorization decisions should be made exclusively on the server-side, tied to the server-side session, and access control should be action-based and identity-aware, enforced at every step of multi-step workflows.
How it was found
- Log in and intercept the POST request for updating email.
- Notice a parameter Admin=false and use a match-and-replace rule to change it to Admin=true.
- Forward the request and observe admin privileges.
- While updating email, spot a roleid field and change its value from 1 to 2.
- Forward the request and gain administrative access.
- Capture the upgrade request as a standard user, replace the session with your own, and change the username to your own.
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.
This write-up shows several ways a website can accidentally let a normal user become an administrator. In one case, the site trusted a hidden field in a form that said whether you were an admin; in another, it let you change your own role by editing your profile. The lesson is that the server must always check permissions itself, not rely on what the user sends.
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.