password reset token leaking allowed for ATO of an Uber account
The password reset token for a valid Uber account was exposed in the HTTP response to a reset request. An attacker who knew a victim's email address could obtain the token and take over the account.
Originally disclosed on HackerOne
- Triaged in 31 hours
- Fixed in 4 days
- Paid in 15 days
- Disclosed after 7 months
Summary by the program
With an email address for a valid Uber account, it was possible to take over that account because the reset token was exposed in the response of a password reset HTTP request. This meant an attacker could initiate password reset for an account and immediately receive the reset token for that account.
We consider the security of our user's data top priority, so we were very interested in this report. Furthermore, @procode701 was a pleasure to work with and we look forward to more reports in the future.
What the report shows
This is a critical-severity report against Uber, disclosed on 17 May 2017 and credited to @procode701. The affected feature is the account password reset flow. The weakness is classed as improper authentication, and the program paid a bounty of 10,000 USD.
The summary the program published is short and describes the whole issue in a few sentences. With an email address belonging to a valid Uber account, it was possible to take over that account, because the reset token was exposed in the response to the password reset HTTP request. An attacker could therefore start a password reset for an account and immediately receive that account's reset token in the reply.
The report does not include the raw request or response, the endpoint, the parameter names, or the exact body that carried the token. What it does establish is the sequence:
- The attacker knows the email address of a valid Uber account.
- The attacker initiates a password reset for that address.
- The server's response to that request contains the reset token itself.
- The attacker uses the token to complete the reset and take over the account.
The program states that it treats the security of user data as a top priority and was very interested in the report. It does not describe the fix that was applied, so the remediation is not part of the public text.
Root cause
The reset token, a bearer secret that alone authorises setting a new password, is returned to the party that requested the reset rather than being delivered only through a channel the account owner controls, such as email. The report states this directly: the token was exposed in the response of the password reset request. The report does not explain why the token was included in the response.
Impact
Because possession of the token is enough to set a new password, anyone who knew a victim's email address could take over the account. The program's summary states that account takeover was possible. No further impact, such as access to payment details or trip history, is described.
How this kind of bug works
Password reset is a two-step flow. The server creates a high-entropy token, associates it with the account and an expiry, and sends it to the address on file. The user presents the token back, usually in a URL or a form field, and the server accepts it as proof of mailbox control and lets the password be changed.
The security of the whole flow rests on the token being known only to the mailbox owner. If the token appears anywhere the requester can read it, the proof-of-ownership step collapses: the attacker no longer needs the mailbox, only the email address. This typically happens when the same endpoint both triggers the email and returns data to the browser, when a debugging or API-friendly response includes internal fields, or when a mobile or single-page client is designed to receive the token and the server trusts whoever asks.
Defences are straightforward: never include the token in any response to the reset request, keep it out of logs and error messages, bind it to a single use and a short lifetime, and invalidate it once the password changes.
How to test for it
- Register a test account you control and note its email address.
- Trigger the password reset for that address and capture the full response: status line, headers and body. Look for any value that resembles a token, a long random string, a code, or a field named like
token,code,keyorreset. - If the body looks empty, check response headers, redirects and any follow-up request the client makes, since the token may travel in a
Locationheader or a second call. - Confirm the value is live: submit it to the reset-completion step and see whether the password actually changes. A token that is returned but rejected is not a finding.
- Repeat with a second account to rule out caching or per-session artefacts.
A positive result is a token in the response that successfully completes the reset. Common false positives are CSRF tokens, session identifiers, request IDs, or a token that is returned but bound to the requester's own session and unusable for another account. Test cross-account: request a reset for account A while authenticated as account B, or unauthenticated, and check whether the returned token works for A.
How it is fixed
The reset request should return a generic acknowledgement only, with no token, code or account-specific data. The token is generated server-side, stored hashed, sent solely to the registered address, and accepted once within a short window. It should be invalidated on use, on password change and on a new reset request. Responses and logs should be reviewed so the token cannot leak through error paths, and clients should never be designed to receive it directly.
Hunting notes
This class tends to hide in flows that serve multiple clients: a web form and a mobile API sharing one handler, where the API variant returns the token for convenience. Password reset, email verification, magic-link login, invitation and MFA-reset endpoints are all worth the same check. Recon signals include API endpoints under paths like /api/ or /v1/ that mirror a web flow, mobile app traffic captured through a proxy, and responses that contain more fields than the UI displays.
What happened, in plain words
This is a critical-severity report against Uber, disclosed on 17 May 2017 and credited to @procode701. The feature involved is the account password reset flow. The weakness is classed as improper authentication, and the program paid a bounty of 10,000 USD.
Every account on a website is protected by a password. If you forget it, most sites offer a "forgot password" or "reset password" link. You type in your email address, the site sends you a special message, and that message contains a secret code, called a reset token. You click the link or paste the code, and the site lets you choose a new password. The whole idea rests on one thing: only the person who can read the email inbox should ever see that token. It is like a cloakroom ticket: whoever holds the ticket gets the coat, so the ticket must go only to the owner.
In this case, the token did not stay in the email. When someone asked the site to reset a password, the site's reply to that request contained the token itself. The program's summary describes it plainly: with an email address for a valid Uber account, it was possible to take over that account, because the reset token was exposed in the response of a password reset HTTP request. An attacker could start a reset for an account and immediately receive that account's reset token in the reply.
A few terms from that summary, from zero:
- A request is the message your browser sends to a website when you do something, such as clicking a button. The website answers with a response.
- A token here is a long random string the server creates. It acts as proof that whoever presents it is allowed to set a new password.
- Account takeover (ATO) means someone else gains control of your account, in this case by setting a new password and locking you out.
The report does not include the raw request or response, the endpoint, the parameter names, or the exact body that carried the token. What it does establish is the sequence:
- The attacker knows the email address of a valid Uber account.
- The attacker initiates a password reset for that address.
- The server's response to that request contains the reset token itself.
- The attacker uses the token to complete the reset and take over the account.
Step 3 is the flaw: the secret that should have gone only to the inbox came back to whoever asked. Step 4 is why the flaw is serious: the token is the secret that authorises setting a new password.
The program states that it treats the security of user data as a top priority and was very interested in the report. It does not describe the fix that was applied.
In general, how this kind of bug works
Password reset is a two-step flow. First, the server creates a long random token, ties it to the account and an expiry time, and sends it to the email address on file. Second, the user presents the token back, usually in a link or a form field, and the server accepts it as proof that the person controls the mailbox, then allows a new password.
The security of the whole flow depends on the token being known only to the mailbox owner. If the token appears anywhere the requester can read it, that proof collapses: the attacker no longer needs the inbox, only the email address. This typically happens when the same endpoint both triggers the email and returns data to the browser, when a debugging or API-friendly response includes internal fields, or when a mobile or single-page client is designed to receive the token and the server trusts whoever asks.
Defences are straightforward: never include the token in any response to the reset request, keep it out of logs and error messages, bind it to a single use and a short lifetime, and invalidate it once the password changes.
How to test for it
- Register a test account you control and note its email address.
- Trigger the password reset for that address and capture the full response: status line, headers and body. Look for any value that resembles a token, a long random string, a code, or a field named like
token,code,keyorreset. - If the body looks empty, check response headers, redirects and any follow-up request the client makes, since the token may travel in a
Locationheader or a second call. - Confirm the value is live: submit it to the reset-completion step and see whether the password actually changes. A token that is returned but rejected is not a finding.
- Repeat with a second account to rule out caching or per-session artefacts.
A positive result is a token in the response that successfully completes the reset. Common false positives are CSRF tokens, session identifiers, request IDs, or a token that is returned but bound to the requester's own session and unusable for another account. Test cross-account: request a reset for account A while authenticated as account B, or unauthenticated, and check whether the returned token works for A.
How it is fixed
The reset request should return a generic acknowledgement only, with no token, code or account-specific data. The token is generated server-side, stored hashed, sent solely to the registered address, and accepted once within a short window. It should be invalidated on use, on password change and on a new reset request. Responses and logs should be reviewed so the token cannot leak through error paths, and clients should never be designed to receive it directly.
Where to look
This class tends to hide in flows that serve multiple clients: a web form and a mobile API sharing one handler, where the API variant returns the token for convenience. Password reset, email verification, magic-link login, invitation and MFA-reset endpoints are all worth the same check. Recon signals include API endpoints under paths like /api/ or /v1/ that mirror a web flow, mobile app traffic captured through a proxy, and responses that contain more fields than the UI displays.
Glossary
- Account takeover (ATO): when an attacker gains control of someone else's account, here by setting a new password.
- Bounty: a payment a company makes to a researcher who reports a valid security bug.
- CSRF token: a random value a site puts in forms to prove a request came from its own pages; it is not a password reset token.
- Endpoint: the specific address on a server that handles a particular action, such as a password reset request.
- Entropy: the amount of randomness in a value; high entropy makes a token hard to guess.
- Expiry: the time after which a token stops being accepted.
- Hash: a one-way transformation of a value, so the server can store a fingerprint of the token without keeping the token itself.
- Header: extra information sent alongside a request or response, such as content type or redirect location.
- Improper authentication: a weakness where a system does not correctly verify who someone is or lets the wrong party prove it.
- Location header: a response header that tells the browser to go to another address, often used in redirects.
- Magic-link login: a login method where clicking a link sent by email signs you in, without a password.
- MFA: multi-factor authentication, an extra check beyond the password, such as a code from a phone.
- Parameter: a named value sent with a request, for example in a URL or form.
- Password reset flow: the steps a site uses to let a user set a new password after forgetting the old one.
- Proxy: a tool that sits between an app and the internet so you can inspect the traffic passing through it.
- Request: the message a browser or app sends to a server asking it to do something.
- Response: the server's reply to a request, including a status line, headers and usually a body.
- Session: a period during which a server remembers who you are, usually via a cookie.
- Session identifier: the value in a cookie that ties your requests to your logged-in session.
- Single-page client: a web app that loads once and fetches data from the server without full page reloads.
- Token: a secret string that grants a specific permission when presented, such as the right to set a new password.
- Vulnerability class: a category of security bug that shares the same underlying cause.