Skip to content
Access control Write-up Intermediate

From Accessing Restricted Functionality via URL Found in .js File, to Vertical Privilege Escalation through Modification of the ‘accessLevel’ Value in HTTP Responses on the API

A low-privileged user could access a restricted endpoint that listed tens of thousands of users, and then create a new user with an accessLevel value of 99, gaining super admin privileges.

YoKo Kho Follow

Published on firstsight.me

Bug Report / Web Apps / Write-Up

YoKo Kho, on firstsight.me

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 missing access control checks on the /invite-user endpoint and on the user creation API, allowing a low-privileged user to list all users and set an arbitrary accessLevel.

Impact

An attacker with a low-privileged account could view tens of thousands of users' details and create a super admin account, gaining full control of the application.

What the attacker needed

A valid low-privileged account; access to the application's JavaScript file

How it was found

  1. Log in with a valid low-privileged account.
  2. Inspect the app.bundle.min.js file to find endpoint names in the dashboardroutes variable.
  3. Access the /invite-user endpoint directly via URL, which lists all users.
  4. Create a new user via POST /api/users, changing the accessLevel parameter from 2 to 99.
  5. If the accessLevel reverts, edit the created user and intercept the save request to set accessLevel to 99 again.
  6. Log in with the new super admin account using the password sent by email.

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 a hidden page that showed a huge list of users, and any logged-in user could open it. Also, when creating a new user, the app trusted a number sent by the browser that said how powerful the new account should be, so the attacker set it to the highest value and became an administrator.

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.

More by YoKo Kho

View all

3 more disclosed reports, best first.

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.