Skip to content
Access control Write-up Beginner

Unlocking Admin Privileges: How I Exploited an IDOR Vulnerability

The application trusted a client-side cookie flag to determine a user's privilege level, so changing that flag from a regular-user value to an admin value granted access to the admin dashboard. An attacker with a normal account could escalate to full admin privileges and view or modify sensitive data.

medium.com

Published on medium.com

Hello, I’m Sahil More, an independent security researcher. I’m excited to share my latest findings with you through this blog.

Krypton, 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

The server trusted a client-controlled cookie value to decide the user's privilege level instead of validating permissions server-side against the authenticated account.

Impact

An attacker with a standard account could gain full admin access, view and modify admin-level data including sensitive user information, and control the application's core features.

What the attacker needed

A standard user account; ability to intercept and modify requests

The fix

The application should not trust client-supplied privilege flags; it should determine authorisation server-side from the authenticated session and enforce access control on every request.

How it was found

  1. Log in to the web application as a standard user and capture traffic with Burp Suite.
  2. Observe that profile requests include the username parameter and a cookie flag named ckright set to 0.
  3. Change the username parameter to an admin account and note that the server returns a permission error.
  4. Intercept another request and change the ckright cookie value from 0 to 1.
  5. Send the modified request and observe a redirect to the admin dashboard without admin credentials.

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 cookie is a small piece of data a website stores in your browser and sends back with each request. Here the site used a cookie to decide whether you are a normal user or an admin, but it never checked that value on its own server. Anyone who edited the cookie in their browser could pretend to be 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.

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.