Skip to content
Access control Write-up Beginner

Abusing Client Controlled Authorization State to Achieve Privileg

The application trusted client-supplied role and permission fields in request bodies when making authorization decisions. An authenticated standard user could change the role value to an administrative one and gain full administrative access.

Jawad Momani Follow

Published on medium.com

This article documents the discovery and exploitation of a privilege escalation vulnerability caused by improper trust in client supplied authorization state. The application relied on values returned by the client to make access control decisions after authentication.

Jawad Momani, 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

Authorization decisions were based on client-controlled role and permission values instead of being derived from server-side session state.

Impact

Any authenticated standard user could gain full administrative access, including viewing other accounts and modifying settings, with no brute force or race conditions required.

What the attacker needed

A standard user account; ability to intercept and modify requests

The fix

The application should remove all client-supplied authorization data, derive roles and permissions exclusively server-side, and enforce centralized access control checks bound to session identity.

How it was found

  1. Log in and observe the user context object returned by the API, including role and permission fields.
  2. Intercept an authenticated request to the account management endpoint.
  3. Modify only the role value in the request body to an administrative role, leaving the session cookie unchanged.
  4. Replay the request; the server accepts it and returns a successful response.
  5. Access previously restricted administrative endpoints to confirm escalation.

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.

After logging in, the app sent the user's role (like 'standard user') back to the server in each request. The server believed whatever role the client said, so a normal user could simply edit that value to 'administrator' and the server would grant admin powers. This is a privilege escalation: getting higher access than you should have.

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 Jawad Momani

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.