0-Click Account Takeover via OAuth Misconfiguration
The external-login endpoint trusted the email and name fields sent in the request body instead of verifying them against the OAuth provider's token, so an attacker could log in as any user by supplying that user's email and name. This allowed full access to the victim's account, including viewing and editing their data.
Published on saeidmicro.medium.com
OAuth is an authorization framework used to identify and authenticate users for an application. There are a number of implementation misconfigurations which can lead to an OAuth framework being implemented insecurely that an attacker can leverage to take over multiple user accounts and manipulate or retrieve data.
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 server trusted the client-supplied email and name in the external-login request rather than deriving the identity from the verified OAuth access token.
Impact
An attacker could take over any user's account and view or edit their data, though the reporter notes the exploit did not work on a later retest.
What the attacker needed
Victim's email address; victim's name; ability to intercept requests
How it was found
- Find the victim's email address.
- Open the login page and start the Google sign-in flow.
- Intercept the request to the external-login endpoint and forward it step by step until that request appears.
- Replace the email and name fields with the victim's email and name.
- Forward the remaining requests.
- You are now logged in as the victim and can view and edit their data.
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.
When you click 'sign in with Google', the site receives a token proving who you are. Here the site also accepted a separate email and name typed into the request and trusted them without checking they matched the token. By swapping in someone else's email, the attacker was logged in as that person.
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.