IDOR: The Simple Switch
An endpoint that toggles Google authentication accepted a user identifier taken from the request body, and the author could swap in another user's email to act on that account. The author also found that changing the request method returned the victim's email address.
Greetings, fellow cybersecurity enthusiasts! Allow me to introduce myself: I’m Ganga Manivannan, a passionate security researcher.
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 authorised the request but did not verify that the supplied user identifier belonged to the authenticated user.
Impact
An attacker could potentially connect their own Google account to a victim's account and enable or disable Google authentication there, and could obtain the victim's email address.
What the attacker needed
A free account; victim's email address known
How it was found
- Create an account with email and password and open the profile settings page.
- Use the feature that connects a Google account and enables or disables Google authentication.
- Capture the configure request, which contains the user ID in the URL and the request body.
- Create a second account and note its identifier.
- Replace the attacker identifier with the victim identifier; this returns a 403 Forbidden response.
- Change the id and summary values to the victim's email address, which succeeds, then switch the request method from POST to GET to receive the victim's email address.
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 user identifier is a value that tells the server which account a request is about. Here the server trusted an identifier supplied by the client instead of checking that it belonged to the logged-in user, so one account could be made to affect another. This kind of flaw is called an IDOR, short for Insecure Direct Object Reference.
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.