Skip to content
Info disclosure Disclosed report Beginner

Lack of rate limiting on get.uber.com leads to enumeration of promotion codes and estimation of a lower bound on the number of Uber drivers

The invite code endpoint on get.uber.com allowed enumeration of 5-character invite codes, revealing account counts and first names, and giving a lower bound on Uber drivers.

ddworken Follow

Originally disclosed on HackerOne

Bounty$3,000 View original
  • Triaged in 3 days
  • Fixed in 4 months
  • Paid in 4 months
  • Disclosed after 5 months

Summary by the researcher

Through enumerating Uber invite codes one could come up with a lower bound on the number of Uber drivers. This was only a lower bound because some people changed their invite codes so enumerating the ~60 million default invite codes would not find theirs.

The report

Invite codes are 5 alphanumeric (lower case) characters. This means there are 36 (26 + 10) possible options for each space in the invite code. In total this means there are 36^5 or 60,466,176 possible invite codes. Through enumerating through all possible invite codes, one can find the total number of Uber accounts and the first name associated with each of the uber accounts.

When loading https://get.uber.com/invite/[Invite Code], one will see one of two possible messages. If you see only Create your account and get moving in minutes. then there is no account associated with that invite code. If you see Sign up now to claim your free gift from [First Name] ($15 off first ride)*., then there is an account associated with that invite code.

For an example of each of the possible responses, see the two below links:

https://get.uber.com/invite/v1m8a

https://get.uber.com/invite/v1m8u

A simple (but inefficient) way of exploiting this is with a simple python program like this (I have not tested the below code):

Python
import requests

characters = '0123456789abcdefghijklmnopqrstuvwxyz' # 

def isAccount(code):
    if "free gift from" in requests.get("https://get.uber.com/invite/"+code).content:
        return True
    return False

numAccounts = 0

for firstChar in characters:
    for secondChar in characters: 
        for thirdChar in characters:
            for fourthChar in characters:
                for fifthChar in characters:
                    if isAccount(firstChar + secondChar + thirdChar + fourthChar + fifthChar):
                        numAccounts += 1

Furthermore, one does not need to actually test all 60,466,176 invite codes. Since the invite codes are distributed randomly, one can simply test a subset of that and extrapolate. For example, if I test 1 million invite codes and find 3% are valid, then I know that approximately 3% of the 60,466,176 possible invite codes are valid (only an estimate).

Thanks, David Dworken

The original report as published on HackerOne, by ddworken. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Uber's signup flow included an invite feature. A prospective rider could be invited through a URL of the form https://get.uber.com/invite/[Invite Code], and the page would present a signup offer tied to the inviter. Invite codes were five characters long, drawn from the lower-case alphanumeric alphabet. The page's response differed depending on whether the code in the URL belonged to an existing account, which is the behaviour the researcher built on.

Setup

The report describes no special accounts, roles or tooling. The only precondition is the ability to send HTTP requests to get.uber.com and read the response body. The researcher's example uses Python with the requests library, and he notes that he did not test the code shown.

Finding it

The invite page leaks whether a given code is associated with an account, and the code space is small enough to walk. With 26 lower-case letters plus 10 digits, each of the five positions has 36 possibilities, giving 36^5, or 60,466,176, possible codes. Because the page answers differently for a valid and an invalid code, the whole space can be queried, and each valid hit yields the first name of the account holder.

Exploitation

Step 1: Compare the two page states

Loading an invite URL returns one of two messages. When no account is associated with the code, the page shows only:

Text
Create your account and get moving in minutes.

When an account is associated with the code, the page instead shows:

Text
Sign up now to claim your free gift from [First Name] ($15 off first ride)*.

The second message includes the first name of the account holder, so a valid code discloses both the existence of the account and that name. The researcher gives two URLs as examples of the two responses:

Text
https://get.uber.com/invite/v1m8a
Text
https://get.uber.com/invite/v1m8u

Step 2: Enumerate the code space

A straightforward, if inefficient, approach is to loop over every combination of five characters and check each response for the marker string that appears only on valid codes. The researcher's example program:

Python
import requests

characters = '[redacted]' #

def isAccount(code):
    if "free gift from" in requests.get("https://get.uber.com/invite/"+code).content:
        return True
    return False

numAccounts = 0

for firstChar in characters:
    for secondChar in characters:
        for thirdChar in characters:
            for fourthChar in characters:
                for fifthChar in characters:
                    if isAccount(firstChar + secondChar + thirdChar + fourthChar + fifthChar):
                        numAccounts += 1

The characters string holds the 36-symbol alphabet. isAccount requests the invite URL for a candidate code and returns True when the body contains free gift from, the substring that only appears on the valid-account variant. The five nested loops generate every code in the space, and numAccounts counts the hits. The researcher states that he did not test this code.

Step 3: Sample instead of enumerating everything

Testing all 60,466,176 codes is unnecessary. Because invite codes are distributed randomly, a subset can be tested and the result extrapolated. If one million codes are tested and 3% turn out to be valid, then approximately 3% of the full space is valid, which gives an estimate of the total. The researcher is explicit that this is only an estimate.

Root cause

The invite page is an unauthenticated endpoint that returns a different response for a valid code than for an invalid one, and it includes the account holder's first name in the valid case. The report does not describe any rate limiting, CAPTCHA or other control on the endpoint.

Impact

By enumerating invite codes, an attacker can derive a lower bound on the number of Uber drivers. It is only a lower bound because some people changed their invite codes, so enumerating the roughly 60 million default codes would not find theirs. Alongside the count, the enumeration reveals the first name associated with each valid account. The report describes the result as a lower bound on the number of Uber drivers and the first name associated with each valid account.

Fix

The report does not describe a fix or a change made by Uber.

Variants to test

  • Invite and referral URLs of the form /invite/<short code>: a positive result is a response body that differs between a known-valid code and a random invalid one, especially when the valid response embeds a name or other account detail.
  • Any short, fixed-length identifier in a public URL (promo codes, referral codes, voucher codes): a positive result is a distinguishable response for valid versus invalid values combined with no throttling after a burst of requests.
  • Sampling rather than full enumeration: request a random subset of the space and check whether the valid rate is stable enough to extrapolate, which is what turns a leak into a countable population.

Hunting notes

This kind of bug hides in unauthenticated marketing and signup endpoints that branch on whether an identifier exists, particularly where the identifier is short and user-visible. During recon, the signal is a page whose text changes between a valid and an invalid value, and a response that echoes a name or other attribute of the referenced account. The researcher showed impact by turning the leak into a population estimate: sampling the code space and extrapolating from the hit rate, while stating the limits of the estimate (changed codes make the figure a lower bound). That combination of a measurable count and a privacy disclosure is what the report presents to the program.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

Uber had a signup feature that let an existing user invite a new rider. The invitation was a web address (a URL) that contained a short code, and when someone opened that address, Uber's website showed a signup offer linked to the person who had sent the invite.

The codes were only five characters long, and each character could be a lower-case letter or a digit. That is a very small set of possible codes, and the page behaved differently depending on whether the code in the address belonged to a real account or not. By trying every possible code, or a sample of them, one could find the number of accounts and the first name attached to each, giving a lower bound on the number of Uber drivers. He used this to estimate a lower bound on the number of Uber drivers.

This kind of problem is called information disclosure: the system gives away information it should not, simply by answering questions differently depending on what is true behind the scenes. Think of a receptionist who, when you ask for a guest by name, says "yes, they are staying here" for real guests and "no such person" for everyone else. Even without being let into the room, you can slowly build a list of who is inside.

Context

Uber's signup flow included an invite feature. A prospective rider could be invited through a URL of the form https://get.uber.com/invite/[Invite Code], and the page would present a signup offer tied to the inviter. Invite codes were five characters long, drawn from the lower-case alphanumeric alphabet. The page's response differed depending on whether the code in the URL belonged to an existing account, which is the behaviour the researcher built on.

A few terms first, because they come up throughout:

  • A URL is just a web address, the thing you type into your browser's address bar.
  • An endpoint is a specific address on a server that answers a particular kind of request. get.uber.com/invite/... is an endpoint.
  • Alphanumeric means letters and digits. Here it means the 26 lower-case letters a to z plus the ten digits 0 to 9.
  • A response is what the server sends back when your browser asks for a page: the HTML, the text, and some behind-the-scenes information.

Setup

The report describes no special accounts, roles or tooling. The only precondition is the ability to send HTTP requests to get.uber.com and read the response body. The researcher's example uses Python with the requests library, and he notes that he did not test the code shown.

In plain terms: you do not need to be logged in, you do not need a special role, and you do not need any unusual software. You only need to be able to ask the website for a page and look at what comes back. A browser can do that by hand; a small program can do it many times quickly.

HTTP is the language browsers and servers use to talk to each other. When you open a page, your browser sends an HTTP request and the server sends an HTTP response. The response body is the actual content of that response, the part a human reads on screen. Python is a programming language, and requests is a popular add-on library for it that makes sending HTTP requests easy.

Finding it

The invite page leaks whether a given code is associated with an account, and the code space is small enough to walk. With 26 lower-case letters plus 10 digits, each of the five positions has 36 possibilities, giving 36^5, or 60,466,176, possible codes. Because the page answers differently for a valid and an invalid code, the whole space can be queried, and each valid hit yields the first name of the account holder.

The arithmetic is worth spelling out. If a code has five positions and each position can be one of 36 symbols, the number of possible codes is 36 multiplied by itself five times: 36 × 36 × 36 × 36 × 36, which is 60,466,176. That sounds like a lot, but a computer can send millions of simple web requests in a reasonable amount of time, especially if nothing slows it down.

Exploitation

Step 1: Compare the two page states

Loading an invite URL returns one of two messages. When no account is associated with the code, the page shows only:

Text
Create your account and get moving in minutes.

When an account is associated with the code, the page instead shows:

Text
Sign up now to claim your free gift from [First Name] ($15 off first ride)*.

The second message includes the first name of the account holder, so a valid code discloses both the existence of the account and that name. The researcher gives two URLs as examples of the two responses:

Text
https://get.uber.com/invite/v1m8a
Text
https://get.uber.com/invite/v1m8u

What these two blocks show is the difference the whole attack depends on. The first message is a generic invitation to sign up. The second message is personalised: it names the person who sent the invite. If you open one of the example URLs in a browser, you see one of these two texts, and the text itself tells you whether the code is real.

The two example URLs are just two specific codes the researcher picked to demonstrate the two outcomes. You can paste either into a browser address bar and compare what appears.

Step 2: Enumerate the code space

A straightforward, if inefficient, approach is to loop over every combination of five characters and check each response for the marker string that appears only on valid codes. The researcher's example program:

Python
import requests

characters = '[redacted]' #

def isAccount(code):
    if "free gift from" in requests.get("https://get.uber.com/invite/"+code).content:
        return True
    return False

numAccounts = 0

for firstChar in characters:
    for secondChar in characters:
        for thirdChar in characters:
            for fourthChar in characters:
                for fifthChar in characters:
                    if isAccount(firstChar + secondChar + thirdChar + fourthChar + fifthChar):
                        numAccounts += 1

Line by line, in plain words:

  1. import requests loads the requests library, which is the part of Python that knows how to fetch web pages.
  2. characters = '[redacted]' stores the 36 allowed symbols in a single string. Every position of a code is drawn from this string.
  3. def isAccount(code): starts the definition of a small helper function called isAccount. It takes one candidate code as input.
  4. if "free gift from" in requests.get("https://get.uber.com/invite/"+code).content: builds the invite URL by gluing the candidate code onto the end of the address, fetches that page, and checks whether the text free gift from appears anywhere in the returned content. That phrase only appears on the valid-account version of the page.
  5. return True says: if the phrase was found, this code belongs to an account.
  6. return False says: otherwise, it does not.
  7. numAccounts = 0 sets a counter to zero. This will hold the number of valid codes found.
  8. The five nested for loops walk through every possible combination of five symbols. The outermost loop picks the first character, the next loop picks the second, and so on down to the fifth. Together they generate all 60,466,176 codes.
  9. if isAccount(firstChar + secondChar + thirdChar + fourthChar + fifthChar): glues the five chosen characters into one code and asks the helper whether it belongs to an account.
  10. numAccounts += 1 adds one to the counter each time the answer is yes.

The researcher states that he did not test this code. The idea is simply to show the shape of the attack: ask the same question over and over with different inputs, and count the yeses.

Step 3: Sample instead of enumerating everything

Testing all 60,466,176 codes is unnecessary. Because invite codes are distributed randomly, a subset can be tested and the result extrapolated. If one million codes are tested and 3% turn out to be valid, then approximately 3% of the full space is valid, which gives an estimate of the total. The researcher is explicit that this is only an estimate.

This is the same logic as guessing how many red sweets are in a large jar by scooping out a small handful and counting the proportion of red ones. You do not need to empty the jar. You do need to accept that your answer is approximate, and the researcher says so plainly.

Root cause

The invite page is an unauthenticated endpoint that returns a different response for a valid code than for an invalid one, and it includes the account holder's first name in the valid case. The report does not describe any rate limiting, CAPTCHA or other control on the endpoint.

Unauthenticated means you do not have to log in to use it. Rate limiting is a control that says "you may make this request only so many times per minute". Without it, a program can ask the same question millions of times without being slowed down. A CAPTCHA is the puzzle that asks you to tick a box or identify pictures, designed to tell humans from programs. The report does not mention either of these.

Impact

By enumerating invite codes, an attacker can derive a lower bound on the number of Uber drivers. It is only a lower bound because some people changed their invite codes, so enumerating the roughly 60 million default codes would not find theirs. Alongside the count, the enumeration reveals the first name associated with each valid account. The report frames the result as an estimate of account numbers and a disclosure of first names, not as access to accounts or to any other data.

A lower bound is a number the true figure cannot be below. If you find 100,000 valid codes, the real number of accounts is at least 100,000, possibly more, because some people changed their invite codes. The report describes the result as a lower bound on the number of Uber drivers and the first name associated with each valid account.

Fix

Variants to test

  • Invite and referral URLs of the form /invite/<short code>: a positive result is a response body that differs between a known-valid code and a random invalid one, especially when the valid response embeds a name or other account detail.
  • Any short, fixed-length identifier in a public URL (promo codes, referral codes, voucher codes): a positive result is a distinguishable response for valid versus invalid values combined with no throttling after a burst of requests.
  • Sampling rather than full enumeration: request a random subset of the space and check whether the valid rate is stable enough to extrapolate, which is what turns a leak into a countable population.

In everyday terms: whenever a website puts a short code in a public address and the page changes depending on whether that code is real, the same pattern may be present. The test is to compare a known-good code with a made-up one, then send a burst of requests and see whether anything slows you down.

Hunting notes

This kind of bug hides in unauthenticated marketing and signup endpoints that branch on whether an identifier exists, particularly where the identifier is short and user-visible. During recon, the signal is a page whose text changes between a valid and an invalid value, and a response that echoes a name or other attribute of the referenced account. The researcher showed impact by turning the leak into a population estimate: sampling the code space and extrapolating from the hit rate, while stating the limits of the estimate (changed codes make the figure a lower bound). That combination of a measurable count and a privacy disclosure is what the report presents to the program.

Recon, short for reconnaissance, is the early stage of looking around a target to see what it exposes. The lesson here is that a small difference in page text, repeated at scale, can become a meaningful privacy problem.

Glossary

  • Alphanumeric: made of letters and digits; here the 26 lower-case letters plus the ten digits.
  • CAPTCHA: a puzzle meant to distinguish a human from a program.
  • Endpoint: a specific address on a server that answers a particular kind of request.
  • Enumeration: trying every possible value of something, one after another, to see which ones exist.
  • Extrapolation: estimating a total from a small sample, assuming the sample is representative.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • Information disclosure: a flaw where a system reveals information it should keep private.
  • Invite code: a short code in a URL that links a new signup to the person who sent the invitation.
  • Lower bound: a number the true figure cannot be below.
  • Rate limiting: a control that restricts how many requests can be made in a given time.
  • Recon: reconnaissance; the early stage of exploring a target to see what it exposes.
  • Response body: the actual content a server sends back, the part a human reads on screen.
  • Unauthenticated: usable without logging in.
  • URL: a web address.

More by ddworken

View all

18 more disclosed reports, best first.

More from Uber

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.