Privilege Escalation by Changing HTTP Response (Admin Access)
The admin subdomain relied on a client-side 'is_admin' flag in the HTTP response to decide if a user was an administrator. An attacker could intercept the response and change the flag to true, gaining admin access to edit products and banners.
Bachrudin Ashari Pujakusuma Follow
Published on medium.com
Hello everyone, this was my first writeup for this community. I hope you enjoy it!
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
Impact
The attacker could log in as an admin and edit, delete, or add products and banners; the text also notes that a man-in-the-middle attack could achieve the same by changing the HTTP response.
What the attacker needed
A free account on the main site; ability to intercept HTTP responses (e.g., via MITM)
The fix
The site should enforce admin authorisation on the server side rather than trusting a client-supplied flag.
How it was found
- Register and complete registration on the main site.
- Go to the profile page and intercept the request with Burp Suite to see the HTTP response.
- Notice the 'is_admin':false parameter in the response.
- Perform subdomain enumeration and find admin.redacted.com.
- Go to admin.redacted.com and intercept the request.
- Change 'is_admin':false to 'is_admin':true in the response to gain admin 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 website sends back some data that includes a flag saying whether you are an admin. The site's admin page trusted that flag without checking on the server. By using a tool to intercept and change the flag from false to true, the attacker could make the site think they were an admin.
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.