Breaking Into an Admin Panel With Zero Credentials
An admin page sent a redirect to the login page but continued executing and included the full admin dashboard in the response body. An attacker could read the protected content by intercepting the response and changing the status code to 200 and removing the Location header, without any credentials.
Every security researcher has a moment like this. You’re three hours into a target, coffee gone cold and you stumble onto something so mundane your brain almost skips past 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
Root cause
The code queued a redirect header but did not stop execution, so the protected page was still rendered and included in the response body.
Impact
An unauthenticated attacker could read the fully rendered admin dashboard, and depending on its contents this could expose sensitive data or state-changing actions.
What the attacker needed
No credentials needed; ability to intercept HTTP responses
The fix
The code should call exit() or otherwise halt execution immediately after sending the redirect header.
How it was found
- Request the admin index page without any session cookie or authentication.
- Intercept the response before the browser follows the redirect.
- Change the status line from 302 Found to 200 OK.
- Remove the Location header from the response.
- Forward the modified response and observe the body.
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 a website wants to send you to a login page, it sends a redirect message. The mistake here is that the server kept building the private admin page and put it in the same response, hoping your browser would ignore it and follow the redirect. By intercepting the response and telling the browser to show the body instead, the private page became visible without logging in.
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.