medium.com 1 min read Original Source

Auth Bypass to Admin via Response Manipulation]

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.

The Discovery

After submitting valid credentials through the login form, I inspected the response closely and noticed something interesting:

{

. “status”: “success”,

. “role”: “user”,

. …

}

The “role”: “user” field caught my attention. I decided to tamper with it and change the value to “admin” directly in the response.

The Exploit

Once the role was modified to admin, the application redirected me to the admin panel, granting full access to restricted admin functionalities.

“role”: “admin”

To my surprise, most admin endpoints were misconfigured and lacked proper server-side role validation, which made this escalation even more impactful.

Impact

This is a P1 (Critical) issue, due to:

• Full privilege escalation from user to admin

• Access to sensitive admin-only endpoints

• Server-side trust based solely on client-controlled values

Root Cause

The backend trusted the client-side role without re-verifying it on subsequent requests. This kind of insecure design pattern (trusting user-controlled data without validation) is often overlooked — and dangerous.

This bug is a reminder that security isn’t just about authentication — authorization matters just as much, if not more.

Stay safe, and keep hunting!

— Gotcha1g