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.
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.
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
- Find a development subdomain by guessing common names.
- Inspect the JavaScript source code for secrets and endpoints.
- Decode the hardcoded token constant to reveal the secret.
- Identify the token generation function that uses the secret.
- Forge an admin token using the exposed function.
- 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.