IDOR chained with JWT token cracking leads to edit, view and deletion of 160000 user accounts.
An API endpoint returned detailed user information for any order ID without checking ownership, and the application signed its JSON Web Tokens with a weak secret that could be cracked. By combining both, an attacker could forge tokens for other users and view, edit or delete their accounts.
Published on aswinthambipanik07.medium.com
Two critical vulnerabilities were identified in a public bug bounty program application’s API that compromise user data and account security. The first vulnerability allows unauthorized access to sensitive user data through an unprotected API endpoint, and the second involves the exploitation of a weak JSON Web Token…
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 endpoint looked up records by a user-supplied identifier without verifying the caller owned them, and the token signing secret was weak enough to be cracked offline.
Impact
An attacker could view, edit and delete the accounts of more than 160,000 users.
What the attacker needed
A valid order ID; ability to run an offline cracking tool
The fix
The report recommends restricting sensitive endpoints with proper authentication and authorisation, rotating to a strong random JWT secret, and verifying token signatures properly.
How it was found
- Send a GET request to the user information endpoint using a valid order ID.
- Read the returned JSON to obtain the victim's user ID and other details.
- Crack the JWT signing secret offline with a cracking tool.
- Forge a token with the cracked secret and the victim's user ID.
- Use the forged token as the authorisation token to act as that user.
- Delete the user account using the manipulated 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.
An API is the part of a website that apps talk to in the background. This one handed back another person's details whenever you asked for their order number, because it never checked that the order was yours. Separately, the login tokens (small signed strings that prove who you are) were signed with a guessable password, so someone could make a valid token for anyone.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.