Skip to content
Access control Write-up Beginner

Auth Bypass to Admin via Response Manipulation]

The login response included a role field set to 'user', and changing it to 'admin' in the response granted access to the admin panel. Most admin endpoints lacked server-side role validation, so the client-controlled value was trusted.

medium.com

Published on medium.com

While assessing a web application during a recent bug bounty engagement, I encountered a critical vulnerability that allowed me to escalate my privileges from a regular user to an administrator — simply by modifying the response from the login request.

Gotcha1G, 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 trusted the client-side role without re-verifying it on subsequent requests.

Impact

Full privilege escalation from a regular user to administrator, with access to sensitive admin-only endpoints, because most admin endpoints lacked proper server-side role validation.

What the attacker needed

Valid user credentials

How it was found

  1. Submit valid credentials through the login form.
  2. Inspect the login response and notice the role field set to 'user'.
  3. Change the role value to 'admin' in the response.
  4. The application redirects to the admin panel, granting access.

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 sends back information about your account, including your role. Here, the application believed whatever role the browser sent back, so a user could simply edit that value to 'admin' and get admin access. This is a broken access control issue: the server must check permissions itself, not trust the client.

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.

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.