Information Disclosure to Account Takeover
An endpoint that validated user emails returned full account details, including an idToken for users who signed in via social accounts. An attacker could take the victim's idToken from that response and submit it in the social login request to log in as the victim without any interaction.
Published on sunilyedla.medium.com
Hi everyone! This is Sunil Yedla, Bug bounty hunter from Andhra Pradesh, India.
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.
Context
This write-up covers a chain found on an external private program. The target is referred to only as target.tld. The feature involved is the login and account validation flow, specifically the endpoint that checks whether an email address exists in the target's database before authentication completes, and the OAuth (social sign-in) flow that lets users connect a Google account to their profile.
The researcher is Sunil Yedla (@sunilyedla2). The initial information disclosure was reported on 9 July, the escalation to account takeover on 13 July, and the write-up was published on 28 July 2021.
Setup
- Two accounts on the target, referred to as
[redacted]and[redacted], both connected to Google via the OAuth flow. - Burp Suite to intercept and replay the login requests.
- No special privileges are described; the precondition is simply that the victim has signed up or connected a social account through OAuth.
Finding it
While intercepting login requests, the researcher noticed that when a user enters credentials and clicks login, the system first verifies whether that user exists in the target's database. That verification happens at this endpoint:
https://<target.tld>/proxyservices/v1/users/validate?searchUser =<Victims_email>
The problem is that the response returns full details of the registered user, including their status, plan and phone number. This was reported responsibly on 9 July.

The screenshot shows the validation response for a searched email address, with the registered user's details displayed.
Exploitation
Step 1: Notice the extra parameter
On 13 July the researcher retested the same endpoint, this time supplying an email address connected to a Google social account. The response contained an additional parameter, idToken. It is base64 encoded data, and after decoding the researcher found a couple of other token values but was not sure where to use them, so the lead was set aside.

The screenshot shows the response containing the idToken value alongside the other user details.
Step 2: Find where the token is consumed
Later the same day, while capturing an OAuth sign-in, the researcher found the idToken parameter in the request. The idToken parameter appears both in the validation response and in the social login request.
Step 3: Harvest the victim's token
With two accounts created and both connected via OAuth, the attacker sends a GET request to the validation endpoint for the victim's address:
https://<target.tld>/proxyservices/v1/users/validate?searchUser =[redacted]
The idToken value is copied from the response.
Step 4: Capture the attacker's own social login
The attacker logs in as [redacted] using the Google social account and captures the request in Burp Suite. The request looks like this:
POST /proxyservices/v1/auth/add/SocialMailUser HTTP/1.1
Host: target.tld
XXX
— — — — — — — — — — — — — — -274014344326728136281788800409
Content-Disposition: form-data; name=”idToken”
<Attackers_idToken>
— — — — — — — — — — — — — — -274014344326728136281788800409
Content-Disposition: form-data; name=”authType”
SOCIAL_GMAIL
— — — — — — — — — — — — — — -274014344326728136281788800409
Content-Disposition: form-data; name=”genPassword”
<genpassword>
— — — — — — — — — — — — — — -274014344326728136281788800409 —
The multipart body carries three fields: idToken, the token identifying the social identity; authType, set to SOCIAL_GMAIL; and genPassword, a generated password value.
Step 5: Swap the token and log in as the victim
The attacker replaces the idToken value with the victim's token, keeping the genpassword value as it is, and sends the request. The attacker is then logged in to the victim's account without any interaction from the victim.
This was reported responsibly to the private program on 13 July. At the time of writing the bounty had not yet been rewarded.
Root cause
The validation endpoint returns the idToken of any user whose email address is supplied, and the social login endpoint (/proxyservices/v1/auth/add/SocialMailUser) trusts the idToken in the request body to decide which account to authenticate. The token is disclosed by the validation endpoint and accepted by the social login endpoint, so possession of the token is enough to assume the account. The server does not appear to bind the token to the session or to verify that the token was issued for the client making the request; the report does not describe any such check. The attacker keeps the genPassword value unchanged and the login still succeeds.
Impact
An attacker can take over any account that signed up using the OAuth flow or connected a social account, without victim interaction. The precondition is knowing the victim's email address and that the victim connected a social account, which lets the attacker query the validation endpoint and retrieve the token. The initial disclosure alone leaks status, plan, phone number and other registered user details for any email address supplied.
Fix
The report does not state what was changed. Based on the behaviour described, the validation endpoint should not return idToken or other account details to an unauthenticated caller, and the social login endpoint should verify that the idToken was issued to the requesting client and bind it to the session rather than accepting any valid token presented in the body.
Variants to test
- Query user-lookup or validation endpoints with a known email and inspect the response for tokens, identifiers or profile fields that should require authentication. A positive result is any token or personal data returned before login.
- Capture the social login request and check whether the identity token in the body is the only thing tying the request to an account. Swap in a token belonging to another account you control; a positive result is being logged in as that other account.
- Decode any base64 token returned by the application and look for additional token values or claims, then search the login and account-linking flows for those parameter names.
- Test whether the
genPasswordor equivalent field is validated against the token by changing it while keeping a valid token; a positive result is a successful login with a mismatched value. - Try the same token swap on account-linking, password-reset and email-change endpoints that accept social identity tokens.
What happened, in plain words
A security researcher found a way to log into any user's account on a private bug bounty program without the user doing anything at all. The attacker needed the victim's email address, and the victim had to have connected a Google account via OAuth. The victim had to have signed up or logged in using their Google account (what people call "social login" or "OAuth").
Here is the story in everyday terms. Imagine a hotel where the front desk will tell anyone who asks whether a guest is staying there, and will also hand over a copy of that guest's room key. That is roughly what the target's website was doing: one part of the site would answer the question "does this email address belong to a registered user?" and, in the answer, it would include a special code (a token) that the site's login system treats as proof of identity. Anyone who could ask the question got the key. Then they could walk to the login desk, show the key, and be let into the room.
The researcher reported the first problem (the information leak) on 9 July 2021. Four days later, on 13 July, while retesting, he noticed the leak also included the token. He then worked out where that token was used, and demonstrated that swapping his own token for the victim's logged him straight into the victim's account. He reported that on 13 July. The write-up was published on 28 July 2021. The bounty had not been paid at the time of writing.
Below I walk through the same steps the researcher took, explaining each concept from scratch.
Background concepts you need first
Before the steps, a few words that come up constantly.
- Endpoint: a specific address on a website that does one job. Think of a large office building: the street address gets you to the building, but each department has its own room number. An endpoint is like
https://example.com/proxyservices/v1/users/validate, a particular room that handles a particular request. - API: the set of endpoints a website offers so that programs (or a browser, or a tool) can talk to it. It is the serving hatch between the front of the site and the database behind it.
- Request and response: your browser sends a request ("please check this email") and the server sends back a response ("yes, here is what I know"). Every interaction on the web is a pair of these.
- GET request: the simplest kind of request, used when you are just asking for information. When you type a web address into your browser, you are making a GET request. Anything after a
?in the address is called a query string, and it carries extra details, like?searchUser=[redacted]. - POST request: a request that sends data to the server, usually to create or change something, such as submitting a login form. The data travels in the body of the request, not in the address.
- Token: a short piece of text that stands in for proof of identity, like a cloakroom ticket. If you hold the ticket, the staff will hand you the coat. Tokens are used because sending a password on every request would be unsafe.
- Base64: a way of writing any data using only ordinary letters, digits and a couple of symbols, so it can travel safely inside text. It is not encryption; anyone can decode it. It is like writing a phone number in words instead of digits: it hides nothing, it just changes the format.
- OAuth / social login: the "Log in with Google" button. Instead of giving the website your Google password, Google gives the website a signed note saying "this person really is who they claim". That note is often called an idToken (identity token).
- Burp Suite: a tool that sits between your browser and a website and lets you look at, pause, edit and resend requests. Think of it as a post office clerk who lets you open every letter before it is delivered, change the contents, and post it again.
- Account takeover: exactly what it sounds like. Someone else gains control of your account and can act as you.
- Information disclosure: a vulnerability where the site reveals data it should not. It can be minor (a version number) or serious (personal details, tokens).
- Authentication bypass: getting past the login check without the correct credentials.
The setup
The researcher worked on an external private program. "Private" means the program is not open to everyone; only invited researchers can test it. The target is referred to only as target.tld throughout the write-up, so the real domain is not disclosed.
The feature involved is the login and account validation flow. Specifically, two parts of the site:
- The endpoint that checks whether an email address exists in the target's database before login completes.
- The OAuth (social sign-in) flow that lets users connect a Google account to their profile.
To demonstrate the attack, the researcher created two accounts on the target, both connected to Google via OAuth. He calls them [redacted] and [redacted]. He used Burp Suite to intercept and replay the login requests. No special privileges were needed. The only precondition is that the victim has signed up or connected a social account through OAuth.
Finding the first problem
While intercepting login requests, the researcher noticed something about how login works on this site. When a user types their email and password and clicks login, the site first checks whether that user exists in its database. That check happens at this endpoint:
https://<target.tld>/proxyservices/v1/users/validate?searchUser =<Victims_email>
Line by line:
https://is the normal secure web protocol.<target.tld>is a placeholder for the real domain, which the write-up does not reveal./proxyservices/v1/users/validateis the endpoint path. Theproxyservicespart suggests a service that sits in front of the user database;v1is a version number;users/validateis the action, "check this user".?searchUser =<Victims_email>is the query string.searchUseris the parameter name, and<Victims_email>is where the email address goes. Note the space before the=; that is how it appears in the write-up.
The problem is that the response returns full details of the registered user, including their status, plan and phone number. In other words, anyone who can reach this endpoint can ask "is this email registered?" and get back a small profile of the person, without logging in. That is the information disclosure. The researcher reported it responsibly on 9 July.

The screenshot shows the validation response for a searched email address, with the registered user's details displayed.
Why this matters on its own: even without the later escalation, this endpoint lets an attacker confirm which email addresses are registered and learn personal details such as phone numbers. That is useful for phishing, for building target lists, and for privacy harm. It is also the seed of the bigger problem, because the same response later turned out to contain a token.
Escalating the problem
Step 1: Notice the extra parameter
On 13 July the researcher retested the same endpoint. This time he supplied an email address that was connected to a Google social account. The response contained an additional parameter, idToken.
The idToken is base64 encoded data. After decoding it, the researcher found a couple of other token values but was not sure where to use them, so he set the lead aside and moved to another target. This is a normal part of research: you notice something odd, you cannot yet see how to use it, and you come back later.

The screenshot shows the response containing the idToken value alongside the other user details.
Why this step matters: the validation endpoint was not just leaking profile data. For users who had connected a social account, it was also leaking the very token that the social login flow uses to prove identity. That is like the hotel front desk handing out the room key along with the guest list.
Step 2: Find where the token is consumed
Later the same day, while capturing an OAuth sign-in, the researcher found the idToken parameter in the request. In other words, the idToken parameter appears both in the validation response and in the social login request. The leak and the login were connected.
Why this step matters: a leaked value is only dangerous if something trusts it. Finding the token in the login request showed that the login system treats it as proof of who you are. That is the bridge from information disclosure to account takeover.
Step 3: Harvest the victim's token
With two accounts created and both connected via OAuth, the attacker sends a GET request to the validation endpoint for the victim's address:
https://<target.tld>/proxyservices/v1/users/validate?searchUser =[redacted]
Line by line:
- Same endpoint as before, same
searchUserparameter. - The value is now
[redacted], the address of the account the attacker wants to break into. - Because this is a GET request, the attacker can send it from a browser, from Burp Suite, or from any tool. No login is required.
The idToken value is copied from the response. That copied value is the victim's key.
Why this step matters: this is the theft. The attacker does not need the victim's password, does not need the victim to click anything, and does not need to be on the same network. He only needs to know the victim's email address and to be able to reach the endpoint.
Step 4: Capture the attacker's own social login
The attacker logs in as [redacted] using the Google social account and captures the request in Burp Suite. The request looks like this:
POST /proxyservices/v1/auth/add/SocialMailUser HTTP/1.1
Host: target.tld
XXX
— — — — — — — — — — — — — — -274014344326728136281788800409
Content-Disposition: form-data; name=”idToken”
<Attackers_idToken>
— — — — — — — — — — — — — — -274014344326728136281788800409
Content-Disposition: form-data; name=”authType”
SOCIAL_GMAIL
— — — — — — — — — — — — — — -274014344326728136281788800409
Content-Disposition: form-data; name=”genPassword”
<genpassword>
— — — — — — — — — — — — — — -274014344326728136281788800409 —
Line by line:
POST /proxyservices/v1/auth/add/SocialMailUser HTTP/1.1is the request line.POSTmeans data is being sent. The path/proxyservices/v1/auth/add/SocialMailUseris the endpoint that handles social login.HTTP/1.1is the protocol version.Host: target.tldtells the server which site the request is for. One server can host many sites, so this line picks the right one.XXXis a placeholder in the write-up for other headers that were present but not shown. Headers are extra pieces of information attached to a request, such as the browser type or cookies.- The blank line after the headers separates them from the body.
- The long dashed line
— — — — — — — — — — — — — — -274014344326728136281788800409is a boundary. When a request carries several pieces of data at once (a multipart body), each piece is separated by a boundary string so the server knows where one ends and the next begins. The number is just a random-looking marker. Content-Disposition: form-data; name=”idToken”says "the next piece of data is calledidToken". The value follows on the next line:<Attackers_idToken>, a placeholder for the attacker's own token.- The next block declares a field called
authTypewith the valueSOCIAL_GMAIL, meaning "this login is via Google". - The last block declares a field called
genPasswordwith the value<genpassword>, a generated password value.
So the multipart body carries three fields: idToken, the token identifying the social identity; authType, set to SOCIAL_GMAIL; and genPassword, a generated password value.
Why this step matters: the attacker needs to see a real, working social login request so he can copy its shape and then change one piece. Capturing your own request is always the safest way to learn what a server expects.
Step 5: Swap the token and log in as the victim
The attacker replaces the idToken value with the victim's token, keeping the genpassword value as it is, and sends the request. The attacker is then logged in to the victim's account without any interaction from the victim.
Why this step matters: the server accepted the swapped token as proof of identity. The server accepted the swapped token as proof of identity, and the attacker's own genPassword was left unchanged and the login still succeeded. The attacker's own genPassword was left unchanged and the login still succeeded, which shows the password field was not tied to the identity at all.
This was reported responsibly to the private program on 13 July. At the time of writing the bounty had not yet been rewarded.
Why it worked
Two weaknesses combined.
First, the validation endpoint returns the idToken of a user whose email address is supplied. So the token is effectively public to anyone who knows an email address.
Second, the social login endpoint (/proxyservices/v1/auth/add/SocialMailUser) trusts the idToken in the request body to decide which account to authenticate. It treats the token as the sole proof of social identity. Because the token is both disclosed by an unauthenticated lookup and accepted as proof, possession of the token is enough to assume the account.
The report does not describe any check binding the token to the session or verifying who it was issued to. The report does not describe any such check. The genPassword field is not validated against the token either, since the attacker's value is kept unchanged and the login still succeeds.
In everyday terms: the front desk gives out room keys to anyone who asks, and the door only checks that the key fits, not who is holding it.
What an attacker could do
An attacker can take over any account that signed up using the OAuth flow or connected a social account, without victim interaction. The precondition is knowing the victim's email address and that the victim connected a social account, which lets the attacker query the validation endpoint and retrieve the token.
Once inside, the attacker is the victim as far as the site is concerned. Whatever the victim could see or do, the attacker can see or do. The write-up does not enumerate specific actions taken after login; it stops at demonstrating the login itself.
The initial disclosure alone leaks status, plan, phone number and other registered user details for any email address supplied. Even if the token issue had been fixed, that leak would still be a privacy problem.
How to fix it
Based on the behaviour described, two things should happen.
- The validation endpoint should not return
idTokenor other account details to an unauthenticated caller. At most it should answer a yes/no question, and ideally only after the caller has proved who they are. - The social login endpoint should verify that the
idTokenwas issued to the requesting client, and bind it to the session, rather than accepting any valid token presented in the body. In other words, the door should check not just that the key fits, but that the person holding it is the person the key was issued to.
Things to try on your own targets
These are the same ideas generalised, so you can look for similar bugs on programs you are authorised to test.
- Query user-lookup or validation endpoints with a known email and inspect the response for tokens, identifiers or profile fields that should require authentication. A positive result is any token or personal data returned before login.
- Capture the social login request and check whether the identity token in the body is the only thing tying the request to an account. Swap in a token belonging to another account you control; a positive result is being logged in as that other account.
- Decode any base64 token returned by the application and look for additional token values or claims, then search the login and account-linking flows for those parameter names.
- Test whether the
genPasswordor equivalent field is validated against the token by changing it while keeping a valid token; a positive result is a successful login with a mismatched value. - Try the same token swap on account-linking, password-reset and email-change endpoints that accept social identity tokens.
Glossary
- Account takeover: a situation where an attacker gains control of someone else's account and can act as that person.
- API: the set of endpoints a website offers so that programs, browsers or tools can talk to it.
- Authentication: the process of proving who you are, usually with a password or a token.
- Authentication bypass: getting past a login check without the correct credentials.
- Base64: a way of writing any data using ordinary characters so it can travel safely inside text.
- Boundary: a marker string in a multipart request that separates one piece of data from the next.
- Burp Suite: a tool that sits between your browser and a website, letting you inspect, pause, edit and resend requests.
- Endpoint: a specific address on a website that performs one job.
- GET request: a request that asks for information, with any extra details carried in the address after a
?. - Header: extra information attached to a request or response, such as the browser type or a cookie.
- idToken: an identity token, typically issued by a social login provider such as Google, that a website uses as proof of who the user is.
- Information disclosure: a vulnerability where a site reveals data it should not.
- Multipart: a way of sending several pieces of data in one request body, each separated by a boundary.
- OAuth / social login: a login method where a third party such as Google vouches for your identity instead of you giving the site your password.
- Parameter: a named value sent with a request, such as
searchUseroridToken. - POST request: a request that sends data to the server, usually to create or change something, with the data in the body.
- Query string: the part of a web address after the
?, carrying extra details. - Request and response: the pair of messages exchanged between a browser (or tool) and a server.
- Vulnerability: a weakness in a system that an attacker can use to do something the designers did not intend.