Skip to content
Access control Write-up Beginner

Exploiting Parameter Driven Authorization Logic in Authenticated APIs

The application accepted a client-supplied user identifier in authenticated API requests and used it to select which account to modify, instead of deriving the account from the session. An authenticated attacker could change another user's email address and other profile data, achieving horizontal privilege escalation.

Pwnedl0l Follow

Published on medium.com

This write up describes the discovery and exploitation of a server side authorization issue caused by trusting identity data provided by the client inside an authenticated API. The flaw allowed one authenticated user to modify data belonging to other accounts, resulting in horizontal privilege escalation.

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

The backend used a client-supplied user identifier as the authoritative selector for account operations instead of binding authorization to the server-side session identity.

Impact

Any authenticated user could modify sensitive information belonging to other users, including email addresses and password change operations, with no special timing or user interaction required.

What the attacker needed

A free account; knowledge of another user's identifier

The fix

The application should derive the target account from the server-side session and ignore any client-supplied identity values, enforcing ownership checks on every state-changing request.

How it was found

  1. Intercept an authenticated profile update request in a proxy.
  2. Note that the JSON body contains a user identifier and a new email value.
  3. Replay the request with only the user identifier changed to another account's ID, leaving the session cookie untouched.
  4. Observe that the server processes the request successfully without an authorization error.
  5. Log in as the victim and confirm the email address was changed.

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 log in, the server gives you a session cookie so it knows who you are. In this app, some requests also included a separate 'user ID' number chosen by the client, and the server used that number to decide whose account to change. Because the server did not check that the number matched the logged-in user, anyone with an account could edit other people's details.

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 Pwnedl0l

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.