Skip to content
Access control Write-up Beginner

Admin Panel Takeover

A JWT token issued for the main site was accepted by the admin panel's frontend, and some admin API endpoints lacked proper server-side role checks, leaking sensitive user data and CTF flags. An attacker with a normal account could reuse their token to access admin-only data.

medium.com

Published on medium.com

Hi, I’m Krishna Tiwari, and in this blog, I’ll walk you through a ADMIN PANEL Takeover Vulnerability . Due to policies, I can’t disclose the domain name, so I’ll refer to the target as example.com.

Krishna, 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 admin backend did not consistently enforce role checks on all API endpoints, and tokens from the main site were accepted by the admin panel.

Impact

An attacker with a normal account could access admin panel data, including sensitive user information and CTF flags, through unprotected API endpoints.

What the attacker needed

A normal user account on the main site; ability to edit local storage in the browser

The fix

The report recommends enforcing role checks server-side on all admin APIs and segregating token scopes between the main site and admin panel.

How it was found

  1. Log in to the main site and copy the JWT from local storage.
  2. Paste that token into the admin panel's local storage.
  3. Reload the admin panel page to gain frontend access.
  4. Browse admin pages and find API endpoints that return sensitive data without role checks.

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 JWT is a token a website gives you after login to prove who you are. The admin panel trusted a token from the main site and some of its APIs did not check if the user was really an admin, so a normal user could see admin data.

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.