$2,400 in 60 Minutes: Hacking a Management Backend by Tweaking a Single Response Packet
The management backend trusted the login response returned to the browser, so an attacker could fake a successful login by editing that response with a guessed role value and a user ID leaked by the public site. This gave access to some backend functions that exposed large amounts of sensitive data.
It’s been a while since I last updated. I recently encountered an interesting vulnerability, so I thought I’d share it with you all.
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
Likely the frontend relied on client-supplied login response fields (user_id and role_type) to decide access, instead of the server checking the session and permissions on every request.
Impact
An attacker could reach part of the management backend without valid credentials and access functions that leaked large amounts of sensitive data, though most functions remained inaccessible.
What the attacker needed
No account needed; ability to intercept and edit responses; a valid user ID leaked publicly
The fix
The backend should verify the session and the user's role on the server for every request, rather than trusting fields in a response the browser can edit.
How it was found
- Review the login page and rule out registration, password recovery and brute force.
- Parse the JavaScript to collect API paths and test them for unauthorised access.
- Find the login response structure by searching for where localStorage is set.
- Look at the public main site's announcement responses to find a creator user ID.
- Intercept the login request and return a crafted response with that user ID and a guessed role value.
- Use the backend functions that became accessible and observe the sensitive data they returned.
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, a website usually asks a server whether your details are correct and then shows you the right pages. Here the website believed whatever the browser said about the login result, so a person could change that answer to pretend to be an administrator. They also needed a real user ID, which they found because the public site showed who created an announcement.
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.