Skip to content
IDOR Write-up Intermediate

Mass Assignment exploitation in the wild - Escalating privileges in style

A user profile update endpoint accepted a hidden 'roles' field from a low-privileged user, allowing that user to set their own role to administrator. An attacker with a normal account could therefore escalate to full administrative privileges.

Gal Nagli Follow

Published on web.archive.org

Mass Assignment Synack Critical Bug Bounty

Gal Nagli, on web.archive.org

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

The server bound all JSON fields from the request to the user object without checking which fields the user was allowed to modify, so a low-privileged user could set the 'roles' field.

Impact

A normal user could escalate their privileges to a fully permissive administrator account.

What the attacker needed

A normal user account; ability to capture and modify requests

The fix

The application should bind the roles parameter only for administrator accounts and not allow normal users to modify it, for example by filtering allowed fields on the server.

How it was found

  1. Create a new user account with limited permissions via the invite endpoint.
  2. Log in as the new user and go to the profile page.
  3. Click 'Save Changes' and capture the profile update request.
  4. Add a 'roles' field set to 'administrator' to the JSON body and send the request.
  5. Observe a 200 OK response and confirm the account now has administrator privileges.

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.

When you edit your profile, the website sends your changes to a server. The server should only accept the fields you are allowed to change, like your name. Here, it also accepted a hidden field that controls your role, so a normal user could make themselves an admin.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by Gal Nagli

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.