Privilege Escalation Allows Low-Privilege Users to View Sensitive Role Data
A low-privilege Analyst user could access role data that should only be visible to Administrators by changing the HTTP method of the role-creation endpoint from POST to GET. The text claims this returned a 200 OK and displayed the roles, though it does not show the response body or confirm what sensitive data was exposed.
Published on medium.com
Hello brothers, After taking some time off for pentesting work and studying, I’m back to hunting again — and this time with my favorite type of bug: Privilege Escalation.
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 authorisation check was applied per HTTP method rather than to the underlying role-data resource, so a GET to the create-role endpoint bypassed the restriction.
Impact
A low-privilege user could view role and permission data intended only for administrators, though the text does not show exactly which fields were returned or whether any write action was possible.
What the attacker needed
A low-privilege Analyst account; knowledge of the admin role endpoints
How it was found
- Sign in as an Administrator and open the Roles tab to observe the request that fetches role data.
- Replay that fetch request using an Analyst account's cookies and note the 403 Forbidden response.
- Replay the POST request used to create a role using the Analyst account and note the 403 Forbidden response.
- Change the create-role request method from POST to GET and send it with the Analyst account.
- Observe a 200 OK response and the roles being displayed.
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.
Websites often check whether a user is allowed to do something based on the type of request being made, such as a GET request to read data or a POST request to create something. Here the site blocked the normal read request and the normal create request for a low-privilege user, but when that user sent a GET request to the create-role address, the site answered successfully. That suggests the permission check was attached to the request type rather than to the action itself.
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.