Skip to content
Access control Write-up Intermediate

From a Simple Client-Side Mistake to Full Read/Write Access of an

The site generated authentication tokens in the browser using a hardcoded secret, so anyone could forge tokens for any user, including admin. The attacker used this to gain full read and write access to support tickets.

Yousef Elsheikh Follow

Published on medium.com

Hi folks, We will discuss today a small mix-up that gave me a road to the internal system flow for the organization.

Yousef Elsheikh, 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 application used a hardcoded secret in client-side JavaScript to generate authentication tokens, and the server trusted these tokens without verifying them properly.

Impact

An attacker could view, create, add notes to, or close support tickets, effectively controlling the ticket system.

What the attacker needed

Access to the website; knowledge of the secret

How it was found

  1. Find a development subdomain by guessing common names.
  2. Inspect the JavaScript source code for secrets and endpoints.
  3. Decode the hardcoded token constant to reveal the secret.
  4. Identify the token generation function that uses the secret.
  5. Forge an admin token using the exposed function.
  6. Send a request to the ticket API with the forged token.

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 secret key used to create login tokens was left in the website's public code. Because the token is made in the browser, anyone could see the secret and make their own tokens, pretending to be any user, even an admin. This let them read and change support tickets.

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 Yousef Elsheikh

View all

2 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.