Skip to content
Access control Write-up Intermediate

How I Became an Accidental Admin and Almost Got Fired (From Someo

A user could set their role to null or other special values during a profile update, which bypassed role validation and granted admin access. This allowed the attacker to export all employee data, promote other users to admin, and access internal database backups.

iski Follow

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.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 role validation only checked the incoming request for allowed role values but did not properly handle special values like null, empty string, or space, leading to a default admin role being assigned.

Impact

An attacker could gain admin access, export sensitive employee data including salaries and Social Security numbers, promote other users to admin, and download database backups.

What the attacker needed

A free user account; ability to send API requests

The fix

The company fixed it by adding server-side role validation on every profile update, implementing proper RBAC checks on all endpoints, adding audit logging for role changes, and migrating to a more secure authentication system.

How it was found

  1. Create a test account and update profile to observe the role parameter.
  2. Send a profile update request with role set to null.
  3. Access an admin endpoint to export all user data.
  4. Use admin access to promote other users to admin.
  5. Access internal database backup endpoint.

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 let users update their profile, including a 'role' field. The server checked if the role was valid when you sent it, but if you sent a special value like null, it didn't store a proper role and the system treated you as an admin. This is like a security guard checking your ID but then letting you in if you show a blank piece of paper.

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 iski

View all

186 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.