From Bug Bounty Hunter to Risk Analyst: My Cybersecurity Journey at Deloitte
An OAuth token generation API only checked the encrypted unique key if it was present in the request; omitting it still returned a valid token for the supplied user ID. Combined with a missing CSRF token that allowed rate limiting to be bypassed, an attacker could have performed mass account takeover of the employee portal.
Published on hunter-55.medium.com
During my time, i worked for multiple clients. Since i already had experience in bug bounty hunting, i was working in one of the critical aspect.
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 token generation endpoint treated the encrypted unique key as optional and skipped validation when the parameter was absent, instead of rejecting the request.
Impact
An attacker could obtain tokens for arbitrary user IDs and, using the missing CSRF token to bypass rate limiting, could perform mass account takeover of the employee portal.
What the attacker needed
Access to the token generation API; knowledge of a valid userid; no CSRF token on the endpoint
How it was found
- Observe that the first API generates an OAuth token using userid, channelname and encuniquekey.
- Remove the channelname parameter and note the request still returns 200 OK.
- Remove the userid parameter and note an error, confirming userid is mandatory.
- Remove the encuniquekey parameter and observe a successful token 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.
A login system used a secret key to create access tokens. The server only checked the key when it was included in the request, so leaving it out still produced a valid token. Because there was also no protection against repeated requests, someone could have tried this for many user IDs and taken over many accounts.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.