Skip to content
Access control Write-up Beginner

️ How I Achieved Full Account Takeover via Horizontal Privilege Escalation on an Authenticated…

A backend endpoint listing organisation users and a password-reset endpoint lacked role checks, so a low-privileged user could enumerate colleagues and reset an administrator's password. The attacker could then log in as the admin and take over the account.

hacker_space11 Follow

Published on medium.com

Access control is one of the most critical components in web applications, especially in systems where organizations consist of multiple user roles. In this case, I discovered a critical flaw that allowed a low-privileged user to hijack any other user in the same organization, including administrators, by abusing a…

hacker_space11, 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 backend trusted the client and enforced no role-based authorisation on the user-listing and password-reset endpoints, relying only on the frontend hiding those actions.

Impact

A low-privileged user could escalate to administrator within their organisation and take full control of other accounts and their data.

What the attacker needed

A low-privileged account in an organisation; an admin account in the same organisation

The fix

The backend should enforce role-based authorisation on both the user-listing and password-reset endpoints so only permitted roles can use them.

How it was found

  1. Create an organisation with an admin account and two regular user accounts.
  2. Log in as a regular user and browse directly to the users endpoint.
  3. Observe the full list of organisation users, including the admin.
  4. Capture the password-reset request sent from the UI.
  5. Replay the reset request with the admin's user ID while authenticated as the regular user.
  6. Log out and sign in as the admin with the new password.

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.

An application has to check on its own server whether a logged-in person is allowed to do something, not just hide the button in the browser. Here the server let any ordinary member of an organisation list all members and change anyone's password, including the boss's. That let a normal user take over the administrator account.

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.