JavaScript Kodlarında Gizlənən $1,250: İlk Bug Bounty Hekayə
An API endpoint exposed user information without proper authorization, and a related endpoint accepted a session ID without validating it, allowing an attacker to retrieve PII for other users. The attacker chained these issues to access sensitive data and received a bounty.
Published on tuncayabulfatzada.medium.com
Bu məqaləmdə həm HackerOne-da qazandığım ilk bounty haqqında, həm də bug bounty edərkən JavaScript kodlarını analiz etməyin önəmi haqqında və bir çox başqa mövzular haqqında danışacam. Hər kəs qazanacağı ilk bounty üçün səbirsizlənir və tez bir zamanda buna nail olmaq istəyir.
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
An attacker could access PII such as names and other sensitive information of other users, potentially leading to privacy breaches.
What the attacker needed
No account needed; Knowledge of user IDs; Access to the web application
The fix
The report was triaged and fixed, as indicated by the bounty awarded.
How it was found
- Capture a request to an endpoint like /api/v1/users/{userId}/sessions/{sessionId}/info.
- Remove the sessions and sessionId parts from the URL to access user info without a session.
- Enumerate userId values to find responses containing an X-AccountId token.
- Search JavaScript files for the X-AccountId parameter to find the /getUserInfo?Key= endpoint.
- Send a request to the getUserInfo endpoint with a userId and X-AccountId, using any SessionId value.
- Observe PII data in the response.
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 an API that returned user details but did not check if the person asking was allowed to see them. By removing some parts of the web address and trying different user numbers, the researcher could see other users' information. Then they found another API that only checked that a session ID was present, not that it was valid, and used it to get personal data like names.
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.