Skip to content
Access control Write-up Beginner

How I Escalated Privileges from “User” to “Admin”

An administrative endpoint lacked server-side authorization checks, allowing a low-privileged user to access a sensitive admin panel. The user could then modify a request to apply admin permissions to their own user group, gaining full admin access.

medium.com

Published on medium.com

It’s been a year since my last write-up, so I thought lets share something interesting.

Saurabh sanmane, on medium.com

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-side endpoint for administrative configuration and the save function lacked authorization checks, relying only on hiding the dashboard from low-privileged users.

Impact

A low-privileged user could gain full administrative access, allowing them to modify user permissions, enable or disable services, and manage user groups.

What the attacker needed

A low-privileged user account

The fix

The application should enforce server-side authorization checks on every request, including hidden endpoints and save functions, not just on visible dashboards.

How it was found

  1. Log in as the lowest privileged user.
  2. Try to access the admin dashboard by changing the URL, which fails.
  3. Intercept web requests and try modifying API endpoints, which also fails.
  4. Inspect the source code and JavaScript files to find a hidden administrative endpoint.
  5. Navigate to the hidden endpoint, which loads without authorization checks.
  6. On the admin panel, select Admin role permissions, intercept the save request, and change the Group ID to the low-level user group to apply admin permissions.

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 different user roles, like 'user' and 'admin'. The admin pages were hidden from normal users, but the server did not check if someone was allowed to use the admin features. By finding a hidden admin web address and changing a request, the tester could give their own account admin rights.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.