Skip to content
Access control Write-up Intermediate

The Admin Panel That Was Meant to Be Forgotten — But Was Still Live 🔐

A legacy admin panel remained deployed in production and could be reached by spoofing internal headers such as X-Forwarded-For, Referer and User-Agent. An attacker could then initiate refunds and view user contact data without any admin login.

Đeepanshu Follow

Published on su6osec.medium.com

Let me walk you through a bug I found that wasn’t supposed to exist. Not because the code was clean — but because the developers thought it was already gone.

Đeepanshu, on su6osec.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

Likely the application trusted client-supplied headers for access control and left a forgotten legacy admin route deployed in production.

Impact

An unauthenticated attacker could reach the legacy admin panel, view user contact data and initiate refunds, with no CSRF protection, input validation or IP rate limits in place.

What the attacker needed

Network access to the web app; ability to set custom request headers; a normal user account for the refund flow

How it was found

  1. Notice that /staff/settings returns 403 rather than 404, suggesting a hidden route.
  2. Send the request with a spoofed User-Agent, X-Forwarded-For set to localhost and a Referer pointing at the admin dashboard.
  3. Receive a 200 response and gain access to the staff settings area.
  4. Find the /admin-lite route referenced in the JavaScript bundle.
  5. Create a test user, place an order and log in through the main site.
  6. Send a spoofed POST request to the refund endpoint and see the refund succeed without an admin login.

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.

Some web apps decide whether a request comes from inside the company by looking at headers the client sends, such as X-Forwarded-For (supposedly the client's IP address) or Referer (the page the request came from). Because anyone can set these headers, an outsider can pretend to be an insider. Here the trick exposed an old admin page that was never removed, letting the author issue refunds without logging in as 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.

More by Đeepanshu

View all

3 more disclosed reports, best first.

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.