Possibility to brute force invite codes in riders.uber.com
The promotion code application endpoint lacked rate limiting or CAPTCHA, allowing an attacker to brute force invite codes. By observing response lengths, an attacker could distinguish valid, invalid, and expired codes, and then use valid codes for free rides.
- Triaged in 21 hours
- Fixed in 28 days
- Paid in 40 days
- Disclosed after 3 months
When adding new promotion codes for free rides, one could brute force invitation codes since there is no protection against brute force attacks.
When going to payment page, it's possible to apply promotion code. If we intercept this request, we can brute force codes, since there is no captcha or limit for tries.
In the pictures bellow, we can see the brute force in question with 3 types of different responses that allow us, to see if the code is valid, expired or invalid.
Responses length:
- 1951 - Valid code
- 1931 - Not valid
- 1921 - Code Expired
Because there is a option to customize codes, and since all the codes that are customized begin with uber, we were able drop the time of the brute force, to a more practical attack.
Finally, we could use a code to get a free ride. An attacker could use this vulnerability to ride in uber for free, creating multiple accounts, each one using one code.
Attachments





Context
Uber's rider web application at riders.uber.com lets a rider attach a promotion code to a ride so that the fare is discounted or covered. The promotion code is entered on the payment page, and the browser sends it to the server for validation. The server answers with one of three outcomes: the code is valid, the code is not valid, or the code has expired.
The report is about the validation endpoint behind that form. It had no protection against repeated attempts, so an attacker could guess invitation codes at will and use a valid one for a free ride.
Setup
The researcher needed the ability to intercept the promotion code request. No special role or privilege is described. The precondition for the attack is that promotion codes exist and that the payment page accepts them for the account being used.
Finding it
The researcher noticed that adding a new promotion code for free rides involved no protection against brute force attacks. The payment page offers a field to apply a promotion code; when the request carrying that code is intercepted, the same request can be replayed with different codes indefinitely, because there is no captcha and no limit on the number of tries.
What made the weakness practical was the response behaviour. The three outcomes (valid, not valid, expired) are distinguishable by the length of the response body, so a script does not need to parse any content: it only needs to compare sizes.
| Response length | Meaning |
|---|---|
| 1951 | Valid code |
| 1931 | Not valid |
| 1921 | Code expired |
A second observation reduced the search space. The application allows codes to be customised, and every customised code begins with uber. Knowing that prefix means the brute force does not have to cover the whole keyspace, which brings the attack down to something practical.
Exploitation
Step 1: Reach the promotion code form
Go to the payment page, where a promotion code can be applied. Submitting a code produces a request that the researcher intercepts.
Step 2: Replay the request with guessed codes
With the request in hand, send it repeatedly with different code values. Nothing in the flow blocks repetition: there is no captcha and no attempt limit, so the guesses can continue for as long as needed.
Step 3: Classify each response by length
For every guess, read the response length and map it to the table above. A length of 1951 means the code is valid, 1931 means it is not valid, and 1921 means it has expired. This is the oracle that turns the endpoint into a code checker.

The screenshot shows the brute force in progress, with the differing responses that reveal whether a code is valid, expired or invalid.
Step 4: Exploit the customisation prefix
Because codes can be customised and all customised codes start with uber, restrict guesses to that prefix. This cuts the time required for the brute force to a more practical attack.

The customisation screen for promotion codes.
Step 5: Use a recovered code
Once a valid code is found, apply it and take a free ride.



Root cause
The validation endpoint applied no rate limiting and no captcha to promotion code submissions, so an unlimited number of guesses could be made against it. On top of that, the three outcomes were distinguishable by response length, giving a reliable signal for each guess, and the customisation feature made codes predictable by fixing their prefix to uber. The design assumed codes would not be guessed, but nothing in the flow enforced that assumption.
Impact
An attacker could obtain valid promotion codes and use them to ride with Uber for free. The report notes that this can be repeated: an attacker can create multiple accounts, each one using one code. An attacker could create multiple accounts, each one using one code.
Fix
The report does not describe a fix or a change made by the program. What the finding calls for is protection on the promotion code endpoint: a limit on attempts and a challenge such as a captcha, so that repeated guesses are no longer free, and removal of the response-length differences between valid, invalid and expired codes so that the outcome cannot be read from the response size.
Variants to test
- Other code and voucher forms. Apply the same method to any endpoint that validates a coupon, referral, invitation or gift code. A positive result is a response that differs measurably between valid and invalid inputs and that can be submitted repeatedly without a challenge.
- Response-length or timing oracles. Where the body content is identical, compare response sizes and response times for valid, invalid and expired inputs. A positive result is a consistent, reproducible difference for each outcome.
- Predictable prefixes and formats. Look for features that let users customise codes or that generate codes from a fixed prefix or pattern. A positive result is a documented or observed prefix that shrinks the search space.
- Missing attempt limits. Submit the same invalid code many times in a row and watch for captchas, lockouts or throttling. A positive result is a long run of identical rejections with no challenge appearing.
Hunting notes
This kind of bug tends to sit in secondary flows rather than the login form: payment pages, promo and voucher redemption, referral and invitation acceptance, and any place where a short user-supplied string is checked against a stored value. During recon, the signals are a code entry field whose result is reported back to the client, and any customisation feature that fixes part of the code. The researcher showed impact by demonstrating the brute force and noting that a code could be used for a free ride across multiple accounts. That combination of a reliable signal, an unlimited number of tries and a direct monetary benefit is what makes the report convincing.
What happened, in plain words
Uber's website for riders, at riders.uber.com, lets you add a promotion code to a ride so that the fare is discounted or free. You type the code on the payment page, and your browser sends it to Uber's server to check whether it is real. The server replies with one of three answers: the code is valid, the code is not valid, or the code has expired.
The problem was that the server had no protection against someone trying lots of codes, one after another. There was no captcha (the little puzzle that proves you are human) and no limit on how many times you could try. So an attacker could guess invitation codes over and over until one worked, then use it for a free ride.
What made it worse was that the three answers could be told apart just by looking at how long the reply was. A script did not need to read the reply at all; it only had to compare sizes. And because Uber let people customise their codes, and every customised code started with uber, the attacker knew the first four characters, which made guessing much faster.
Context
What the product and feature do
Uber is a ride-hailing service. Riders use a website or app to request a car and pay for the trip. The rider website at riders.uber.com includes a payment page where you can attach a promotion code to a ride. A promotion code is a short string of letters and numbers that gives you a discount or a free ride. Think of it like a coupon you cut out of a newspaper: you hand it over at the till, and the cashier checks whether it is real and still valid.
When you type a code and submit it, your browser does not decide whether it is good. It sends the code to Uber's server, and the server decides. The server is the only one that knows which codes exist and which have expired. The browser just shows you the answer.
What an API is
An API (Application Programming Interface) is the set of addresses and rules a website uses to talk to its server behind the scenes. When you click a button, your browser sends a request to one of those addresses, and the server sends back a response. You never see this in the address bar; it happens quietly in the background. In this report, the important API is the one that checks a promotion code.
What a request and a response are
A request is a message your browser sends to a server: "here is what I want". A response is the message the server sends back: "here is the answer". Both have a body (the content) and headers (extra information, like the format of the content). The length of the response body is simply how many bytes of content came back. That number can differ depending on what the server decided to say.
What the vulnerability class means
This bug is a violation of secure design principles. That is a broad label for a system that was built without thinking about how an attacker might misuse it. Here, the design assumed nobody would try thousands of codes, but nothing in the system enforced that assumption. There was no lockout, no delay, no captcha. The design was secure only if everyone behaved nicely.
The three outcomes
The server answers with one of three results:
- the code is valid (it exists and can be used),
- the code is not valid (it does not exist),
- the code has expired (it existed but is no longer usable).
Each outcome produces a slightly different response, and the report shows that the difference can be measured by length.
Setup
To reproduce this, the researcher needed a way to intercept the promotion code request. Intercepting means catching the request after your browser sends it but before it reaches the server, so you can look at it, change it, and send it again. A common tool for this is a proxy, which sits between your browser and the internet. Think of it as a mail sorter who opens your letter, lets you rewrite it, and then posts it on.
No special role or privilege is described. The only precondition is that promotion codes exist and that the payment page accepts them for the account being used.
Finding it
The missing protection
The researcher noticed that adding a new promotion code for free rides involved no protection against brute force attacks. A brute force attack is simply trying many possibilities until one works, like trying every key on a keyring until the door opens. It is slow but reliable if nothing stops you.
The payment page offers a field to apply a promotion code. When the request carrying that code is intercepted, the same request can be replayed with different codes indefinitely. Replaying means sending the same request again, possibly with a small change. Because there is no captcha and no limit on the number of tries, the guesses can continue for as long as needed.
The signal: response length
What made the weakness practical was the response behaviour. The three outcomes (valid, not valid, expired) are distinguishable by the length of the response body. A script does not need to parse any content: it only needs to compare sizes. This is called an oracle: a source of information that answers a question for you. Here, the oracle answers "is this code valid?" by the size of the reply.
The report gives these lengths:
| Response length | Meaning |
|---|---|
| 1951 | Valid code |
| 1931 | Not valid |
| 1921 | Code expired |
A length of 1951 bytes means the code is valid, 1931 means it is not valid, and 1921 means it has expired. The numbers differ by only a few bytes, but a computer can compare them exactly.
The second observation: a predictable prefix
The application allows codes to be customised. That means a user can customise the code. The report says that every customised code begins with uber. Knowing that prefix means the brute force does not have to cover the whole keyspace. The keyspace is the set of all possible codes; if you know the first four characters, you can skip every code that does not start with them, which shrinks the search enormously. This brings the attack down to something practical.

The customisation screen for promotion codes.
Exploitation
Step 1: Reach the promotion code form
Go to the payment page, where a promotion code can be applied. Submitting a code produces a request that the researcher intercepts.
Step 2: Replay the request with guessed codes
With the request in hand, send it repeatedly with different code values. Nothing in the flow blocks repetition: there is no captcha and no attempt limit, so the guesses can continue for as long as needed. The reason for this step is that each replay tests one guess.

Step 3: Classify each response by length
For every guess, read the response length and map it to the table above. A length of 1951 means the code is valid, 1931 means it is not valid, and 1921 means it has expired. This is the oracle that turns the endpoint into a code checker. The reason for this step is that the length is the only signal you need; you do not have to read the text of the response.

The screenshot shows the brute force in progress, with the differing responses that reveal whether a code is valid, expired or invalid.

Step 4: Exploit the customisation prefix
Because codes can be customised and all customised codes start with uber, restrict guesses to that prefix. This cuts the time required for the brute force to a more practical attack. The reason for this step is that every guess that does not start with uber is wasted, so skipping them saves most of the work.
Step 5: Use a recovered code
Once a valid code is found, apply it and take a free ride.

Root cause
The validation endpoint applied no rate limiting and no captcha to promotion code submissions, so an unlimited number of guesses could be made against it. Rate limiting means refusing or slowing requests after too many in a short time; captcha means asking for proof of humanity. On top of that, the three outcomes were distinguishable by response length, giving a reliable signal for each guess, and the customisation feature made codes predictable by fixing their prefix to uber. The design assumed codes would not be guessed, but nothing in the flow enforced that assumption.
Impact
An attacker could obtain valid promotion codes and use them to ride with Uber for free. The report notes that this can be repeated: an attacker can create multiple accounts, each one using one code. An attacker could create multiple accounts, each one using one code.
Fix
The report does not describe a fix or a change made by the program. What the finding calls for is protection on the promotion code endpoint: a limit on attempts and a challenge such as a captcha, so that repeated guesses are no longer free, and removal of the response-length differences between valid, invalid and expired codes so that the outcome cannot be read from the response size.
Variants to test
- Other code and voucher forms. Apply the same method to any endpoint that validates a coupon, referral, invitation or gift code. A positive result is a response that differs measurably between valid and invalid inputs and that can be submitted repeatedly without a challenge.
- Response-length or timing oracles. Where the body content is identical, compare response sizes and response times for valid, invalid and expired inputs. A positive result is a consistent, reproducible difference for each outcome.
- Predictable prefixes and formats. Look for features that let users customise codes or that generate codes from a fixed prefix or pattern. A positive result is a documented or observed prefix that shrinks the search space.
- Missing attempt limits. Submit the same invalid code many times in a row and watch for captchas, lockouts or throttling. A positive result is a long run of identical rejections with no challenge appearing.
Hunting notes
This kind of bug tends to sit in secondary flows rather than the login form: payment pages, promo and voucher redemption, referral and invitation acceptance, and any place where a short user-supplied string is checked against a stored value. During recon, the signals are a code entry field whose result is reported back to the client, and any customisation feature that fixes part of the code. The researcher showed impact by demonstrating the brute force and noting that a code could be used for a free ride across multiple accounts. That combination of a reliable signal, an unlimited number of tries and a direct monetary benefit is what makes the report convincing.
Glossary
- API: the set of addresses and rules a website uses to talk to its server behind the scenes.
- Brute force attack: trying many possibilities until one works, like trying every key on a keyring.
- Captcha: a puzzle that proves you are human, used to slow down automated guessing.
- Cookie: a small piece of data a website stores in your browser to remember who you are; not used in this report but common in web security.
- Endpoint: a specific address on a server that accepts requests, for example the one that checks a promotion code.
- Headers: extra information sent with a request or response, such as the format of the content.
- Intercept: to catch a request between your browser and the server so you can inspect or change it.
- Keyspace: the set of all possible codes or passwords.
- Oracle: a source of information that answers a question for you; here, the response length tells you whether a code is valid.
- Prefix: the first few characters of a string; here,
uber. - Promotion code: a short string that gives a discount or free ride when entered on the payment page.
- Proxy: a tool that sits between your browser and the internet and lets you see and modify traffic.
- Rate limiting: refusing or slowing requests after too many in a short time.
- Replay: to send the same request again, possibly with a small change.
- Request: a message your browser sends to a server asking for something.
- Response: the message a server sends back.
- Response body: the content of a response, whose length can be measured.
- Token: a piece of data that proves who you are or authorises an action; not used in this report but common in web security.
- Violation of secure design principles: a broad label for a system built without thinking about how an attacker might misuse it.