Skip to content
Access control Write-up Intermediate

$$ From 403 Forbidden to Superadmin: My Path Through the Backdoor

An admin settings page returned 403, but HTTP verb tampering and a spoofed X-Forwarded-For header bypassed the access control, exposing a read-only admin panel. An IDOR on a user API and a user-switching endpoint then allowed escalation to superadmin, and exposed API keys gave access to internal logs.

medium.com

Published on medium.com

Sometimes, all it takes is a little curiosity, some HTTP trickery, and an overlooked misconfiguration to move from being locked out to having the keys to the kingdom. Here’s how a simple 403 Forbidden page led to full superadmin access on a production system.

Aman Sharma, on 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 access control was enforced only at the edge (WAF or frontend) and trusted client-controlled headers and identifiers, while the backend did not verify authorisation for each request.

Impact

The tester could escalate from a blocked page to full superadmin control and use exposed cloud, chat and payment tokens to read internal logs and confidential data, meaning a complete compromise of the backend.

What the attacker needed

No account needed initially; target uses a WAF or edge access control; backend trusts X-Forwarded-For; API accepts user-supplied user IDs

How it was found

  1. Gather subdomains and live URLs, then find an admin settings URL that returns 403.
  2. Try different HTTP methods and a spoofed X-Forwarded-For header until one returns 200 OK.
  3. Inspect the admin panel and note the current user role is read-only.
  4. Request another user's details by changing the user_id parameter.
  5. Call the switch-user endpoint with the superadmin's user ID to change the session role.
  6. Open the API keys page and use the leaked tokens against internal APIs.

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.

A website blocked a page with a '403 Forbidden' error, which normally means 'you are not allowed'. The tester changed small details of the request, such as the HTTP method or a header that claims the request came from the server itself, and the page opened. Once inside, the site trusted a user ID supplied by the browser, so the tester could ask for another user's details and switch to a more powerful account.

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.

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.