Skip to content
Access control Write-up Beginner

Privilege Escalation Via Parameter Tampering

A normal user could reach administrator-only functions by swapping their own bearer token into an admin request and flipping a custom header from true to false. This let the attacker edit other users' details and open other restricted pages.

Abhijith M Follow

Published on systemweakness.com

Here is the story of how I got the Privilege Escalation via Parameter Tampering from a web application. (Not disclosing any Target site info).

Abhijith M, on systemweakness.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 trusted a client-supplied header (Checkhasgrant) as the authorisation decision instead of checking the user's role from the bearer token.

Impact

A normal user could edit other users' details and reach other administrator-only pages, though the text does not show what further actions those pages allowed.

What the attacker needed

A normal user account; an admin account to capture a request; a proxy tool such as Burp

How it was found

  1. Log in as the admin user and open the admin panel.
  2. Change a user's name, capture that request and send it to Burp Repeater.
  3. Log in as the normal user and copy that user's bearer token.
  4. Replace the admin token in the captured request with the normal user's token and forward it.
  5. Observe the 'Unauthorized access' error, then change the Checkhasgrant header from true to false and forward again.
  6. Repeat the same change on other pages that carry the header to reach further restricted pages.

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 site decided what you were allowed to do partly by trusting a value the browser sends with each request, called a header. The attacker logged in as an ordinary user, took their own login token, and put it into a request that only admins should make. Changing one header value made the server treat the request as allowed, so the ordinary user could do admin things.

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 Abhijith M

View all

1 more disclosed report, 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.