Skip to content
Access control Write-up Beginner

Privilege escalation on private program.

A non-admin user could access an admin-only endpoint to add subscribers because the required token was leaked in JavaScript served to non-admin users. By copying the token from the admin account and using it in the URL, the attacker could perform admin actions without admin privileges.

Imran Parray Follow

Published on medium.com

Hope everyone is doing fine, So today i am going to share another Privilege escalation issue which i came across few days before while hunting on one of the private programs on bugcrowd.

Imran Parray, 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

Impact

A non-admin user could add new subscribers to the account, an action reserved for admins, by using a leaked token.

What the attacker needed

A non-admin account; access to the admin account to obtain the token

How it was found

  1. Log in as a non-admin user and browse to the admin-only endpoint, which returns a blank page.
  2. Clear Burp traffic and browse the application as the non-admin user.
  3. Copy the token from the admin account and search for it in the Burp traffic.
  4. Find the token leaked in a JavaScript tag served to the non-admin user.
  5. Append the leaked token to the endpoint URL and browse it to add subscribers without admin privileges.

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.

The website had a special page for admins to add subscribers, protected by a secret token in the web address. However, that secret token was accidentally included in the JavaScript code that every user, including non-admins, receives. So a normal user could find the token and use it to reach the admin page and add subscribers, which they should not be able to do.

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.