Skip to content
Access control Write-up Beginner

Gaining Admin Access by Modifying a Hidden Parameter in User Pro

The profile update endpoint accepted a client-supplied access_token field and stored it, so a regular user could change their own role value to an admin one. The attacker could then reach the admin panel and gain full administrative control.

Fenro Follow

Published on medium.com

Sometimes, the smallest oversight in access control can completely compromise a web application. In this article, I’ll explain how I escalated my privileges from a regular user to a full system admin by analyzing and modifying a hidden parameter in the user profile.

Fenro, 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

The server trusted a client-supplied access_token field for role information and did not validate or restrict role changes server-side.

Impact

A regular user could escalate to full system admin and access administrative functionality.

What the attacker needed

A regular user account; ability to send profile update requests

The fix

User roles and access levels should be enforced server-side only, with access control checks on every request and no reliance on client-supplied parameters.

How it was found

  1. Log in and open the Edit Profile section.
  2. Update the email and observe the profile update request.
  3. Notice the access_token value in the response and decode it from Base64.
  4. Send the profile update request again with a modified access_token value.
  5. Refresh the dashboard and see the Admin Panel menu appear.

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.

A web app decides what you are allowed to do by looking up your role, such as normal user or admin. Here the app let the user's own browser send that role value back during a profile update and simply saved it. By editing the value, a normal user could make the server believe they were an admin.

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 Fenro

View all

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