../../ to Admin for a $,$$$ Bounty
A viewer-role user could reach admin-only internal API endpoints by supplying a path-traversal sequence in the Action parameter, which was concatenated into an internal URL without sanitisation. This allowed the attacker to promote their own account to admin.
medium.com
Published on medium.com
140 endpoints I wasn’t allowed to touch. That gap is not a limitation, that’s a to-do list.
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 Action parameter was concatenated into an internal URL path without sanitisation, and internal service-to-service calls bypassed role checks.
Impact
A viewer could promote their own account to admin, gaining full control over the application.
What the attacker needed
A viewer account; knowledge of admin endpoints
How it was found
- Create an admin account on a second tenant and record all requests made by admin features.
- Replay those requests using a viewer session cookie to identify endpoints that return 200 instead of 403.
- Send a request with Action=./ViewSettings to test if the value is treated as a path (it returns 200).
- Send a request with Action=../admin/viewsettings to traverse up and access admin settings.
- Send a request with Action=../../api/admin/promote/<my_user_id> to promote the viewer account to admin.
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.
The application had two roles: admin and viewer. The viewer account should only be able to do a few things, but the server took a value from the user and used it to build a file path without checking it. By putting '../' in that value, the user could make the server call internal admin functions, like promoting themselves to admin.
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.