#BugBounty — How I could book cab using your wallet money in India’s largest auto transportation company!
The web application's OTP verification relied on client-side validation, allowing an attacker to bypass it by replacing the wrong OTP response with a successful one. This enabled booking a cab using the victim's mobile number and deducting money from the victim's wallet.
Published on medium.com
{{media:0}}
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 bug bounty finding in what the author describes as India's largest online auto transportation company. The target was the company's web application, not its Android app, and that choice was deliberate: the author reasoned that companies focus their security attention on the mobile app because that is where most customer traffic goes, so the website is more likely to hold loopholes.
The feature involved is the cab booking flow. A user enters a pickup and destination location, then supplies a mobile number, which is authenticated with an OTP before the ride is booked. Payment defaults to the platform's own wallet, from which money is deducted automatically unless another payment mode is chosen.
Setup
The author used a test mobile number of his own, entered the correct OTP, and captured the corresponding success response, and a victim mobile number to observe the failure path. The only tooling mentioned is HTTP request capture and replay: the raw request was captured to analyse it, and responses were captured and swapped. No versions, endpoints or parameter names are given in the report.
Finding it
The first instinct on seeing OTP verification is how to bypass it. The author tried brute forcing the OTP, but the application blocked the account after successive wrong attempts, so that path was closed. Capturing the raw HTTP request and analysing it did not help either.
What did help was a pattern from a previous hunt: sometimes developers leave out server-side validation and rely entirely on the client side. With that in mind, the author looked at what the server returned in each case rather than at the request itself.
Exploitation
Step 1: Walk the booking flow
The author went to the site, entered pickup and destination locations, and was presented with the page asking for a mobile number for OTP confirmation.
Mobile number needed to authenticate

OTP Verification
Step 2: Capture the success response with a test number
The author entered his own test mobile number, put the correct OTP in the box, and saved the success response. The report notes that there is no session management, so the only remaining path was to bypass OTP verification itself.
HTTP Success Response
Step 3: Capture the failure response with the victim number
The author then entered the victim's mobile number, submitted a wrong OTP, and captured the resulting HTTP response.
Wrong OTP HTTP response
Step 4: Swap the responses
The author captured the wrong-OTP HTTP response, replaced it with the HTTP response from the correct OTP, and forwarded it. The application then returned the following page.

Ride successfully booked
The ride was booked against the victim's mobile number. Because the platform's wallet is the default payment method and money is deducted automatically unless another mode is chosen, the fare was taken from the victim's wallet. The author was therefore able to book a cab on the victim's number using the victim's wallet money.
Root cause
The OTP check was not enforced server-side in a way the client could not override. The author's stated hypothesis, drawn from earlier hunts, is that the developers missed server-side validation and left the decision on the client side. In practice, the server accepted a replayed success response in place of the failure response for a wrong OTP, so the verification result was effectively controlled by whatever the client sent back.
The brute-force protection did work: some blocking was set on the application after successive wrong attempts. That defence only limits guessing, though, and does nothing when the verification outcome can be substituted outright. The author notes that there is no session management, which is consistent with the swap succeeding.
Impact
An attacker who knows a victim's mobile number can complete a booking against that number without the OTP, and the fare is deducted from the victim's wallet by default. The author demonstrated this end to end: the ride was booked on the victim's number and paid for from the victim's wallet. The report does not describe any further actions, such as draining the wallet beyond a single fare, or any limits on how often this could be repeated.
Fix
The report gives a timeline rather than a description of the change:
| Date | Event |
|---|---|
| 03-Feb-2018 | Bug reported to the company |
| 03-Feb-2018 | Bug marked fixed |
| 03-Feb-2018 | Re-tested and confirmed the fix |
| 09-Feb-2018 | Rewarded by the company |
What was actually changed is not stated. The fix implied by the finding is to validate the OTP on the server and bind the verified number to a server-side session, so that a client-supplied success response cannot stand in for a failed verification.
Variants to test
- Response swapping on any OTP or verification step: submit a wrong code, capture the failure response, then replay the success response captured with your own number. A positive result is the application proceeding as if verification passed for the other number.
- Status-code and body tampering: change the failure response's status or body fields to match the success response. A positive result is the next page loading with the unverified number.
- Missing session binding: after a successful verification with your own number, change the number in the subsequent booking or profile request. A positive result is the action applying to the other number.
- Client-side-only checks: inspect whether the verification decision is made in JavaScript or by a response field the client trusts. A positive result is the flow continuing when that field is set manually.
- Wallet as default payment: on any platform with a stored balance, check whether a booking or order can be completed against another account's number and charged to that account's balance. A positive result is a confirmed order paid from the other balance.
What happened, in plain words
A security researcher found a way to book a cab on someone else's mobile number without ever knowing the one-time password (OTP) that the app sends to that person's phone. Because the cab company's app pays for rides from a built-in wallet by default, the fare came out of the victim's wallet, not the researcher's. The researcher reported it, the bug was marked fixed the same day, and the researcher was rewarded a few days later.
The company is described in the report as India's largest online auto transportation company. The researcher deliberately attacked the website rather than the Android app, on the reasoning that companies put most of their security effort into the mobile app, because that is where most customers are, so the website is more likely to have gaps.
The feature being attacked
The cab booking flow works like this:
- You type in where you want to be picked up and where you want to go.
- The site asks for your mobile number.
- The site sends a one-time code (the OTP) to that number.
- You type the code into the site to prove the number is yours.
- The ride is booked, and by default the fare is taken from the company's own wallet balance, unless you pick another payment method.
An OTP is a second proof of identity: something you have (your phone) rather than something you know (a password). The everyday comparison is a bank sending you a code before letting a transfer go through. If you can get past that step without the code, you can act as if you were the phone's owner.
The idea behind the attack
When a security researcher sees an OTP screen, the first question is always: can I get past it? The researcher tried the obvious route first, guessing codes over and over (brute forcing). The application blocked the account after several wrong attempts, so guessing was closed off. Capturing the raw HTTP request and studying it did not help either.
What did help was a lesson from an earlier hunt: sometimes developers forget to check something on the server and leave the decision entirely to the browser (the client side). The everyday comparison is a nightclub where the bouncer checks your ID at the door, but the person handing out wristbands inside just believes whatever you tell them. If you can show a wristband from a friend who got in legitimately, you are treated as if you had passed the check yourself.
So instead of looking at what the browser sends, the researcher looked at what the server sends back in each case, and tried swapping one reply for another.
Step by step
Step 1: Walk through the booking flow
The researcher went to the site, entered a pickup and a destination, and reached the page asking for a mobile number for OTP confirmation.
Mobile number needed to authenticate

OTP Verification
This step matters because you need to see the whole flow before you can interfere with it. You cannot swap a reply if you do not know which reply comes from which stage.
Step 2: Capture the success reply with your own number
The researcher entered his own test mobile number, typed the correct OTP, and saved the reply the server sent back.
HTTP Success Response
Why do this? Because you need a genuine example of what a successful verification looks like from the server's point of view. That saved reply becomes the thing you will try to reuse later.
The report notes that there is no session management at this point. A session is the server's memory of who you are between one page and the next; it is usually kept with a cookie, a small piece of data your browser stores and sends back with every request, or with a token, a string the app includes to identify you. With no session, the server has no independent record tying the verified number to the booking, so the only thing standing between an attacker and a booking is the verification reply itself.
Step 3: Capture the failure reply with the victim's number
The researcher then entered the victim's mobile number, submitted a wrong OTP, and captured the reply that came back.
Wrong OTP HTTP response
Why do this? To see exactly what a failed verification looks like, so you can compare it with the success reply from Step 2 and understand what the server is checking.
Step 4: Swap the replies
The researcher captured the wrong-OTP reply, replaced it with the reply from the correct OTP, and forwarded it. The application then showed this page:

Ride successfully booked
The ride was booked against the victim's mobile number. Because the wallet is the default payment method and money is taken automatically unless another mode is chosen, the fare came out of the victim's wallet. The researcher had booked a cab on someone else's number using someone else's money.
Why it worked
The OTP check was not enforced on the server in a way the browser could not override. The researcher's stated explanation, based on earlier hunts, is that the developers missed server-side validation and left the decision on the client side. In practice, the server accepted a replayed success reply in place of the failure reply for a wrong OTP, so the verification result was effectively controlled by whatever the browser sent back.
The brute-force protection did work: some blocking was set on the application after successive wrong attempts. But that defence only limits guessing. It does nothing when the verification outcome can simply be substituted.
The researcher notes that there is no session management, which fits with the swap succeeding.
What an attacker could do
Anyone who knows a victim's mobile number can complete a booking against that number without the OTP, and the fare is taken from the victim's wallet by default. The researcher demonstrated this end to end: the ride was booked on the victim's number and paid for from the victim's wallet. The report does not describe any further actions, such as draining the wallet beyond a single fare, or any limits on how often this could be repeated.
The fix
The report gives a timeline rather than a description of the change:
| Date | Event |
|---|---|
| 03-Feb-2018 | Bug reported to the company |
| 03-Feb-2018 | Bug marked fixed |
| 03-Feb-2018 | Re-tested and confirmed the fix |
| 09-Feb-2018 | Rewarded by the company |
What was actually changed is not stated. The fix implied by the finding is to validate the OTP on the server and bind the verified number to a server-side session, so that a browser-supplied success reply cannot stand in for a failed verification.
Other places to look for the same mistake
These are the same idea applied to other verification steps. Each one is worth trying on a site you are authorised to test.
- Response swapping on any OTP or verification step: submit a wrong code, capture the failure reply, then replay the success reply captured with your own number. A positive result is the application proceeding as if verification passed for the other number.
- Status-code and body tampering: change the failure reply's status or body fields to match the success reply. A positive result is the next page loading with the unverified number.
- Missing session binding: after a successful verification with your own number, change the number in the subsequent booking or profile request. A positive result is the action applying to the other number.
- Client-side-only checks: inspect whether the verification decision is made in JavaScript or by a reply field the browser trusts. A positive result is the flow continuing when that field is set manually.
- Wallet as default payment: on any platform with a stored balance, check whether a booking or order can be completed against another account's number and charged to that account's balance. A positive result is a confirmed order paid from the other balance.
Glossary
- OTP (one-time password): a short code sent to your phone that proves you hold that phone; it is meant to be used once and then expire.
- Brute forcing: trying many guesses in a row, for example every possible OTP, until one works.
- Rate limiting / blocking: a server-side defence that stops accepting attempts after too many failures, which is what stopped the guessing here.
- HTTP request: the message your browser sends to a server when you load a page or submit a form.
- HTTP response: the message the server sends back, containing the page or data and a status code.
- Status code: a number in the response that says broadly what happened, such as success or failure.
- Client side: code running in your browser, which you control and can change.
- Server side: code running on the company's machine, which you cannot see or change directly.
- Server-side validation: the server checking something itself rather than trusting what the browser says.
- Session: the server's memory of who you are across several requests.
- Session management: how the server creates, stores and checks that session.
- Cookie: a small piece of data your browser stores for a site and sends back with each request, often used to carry a session.
- Token: a string the app includes with requests to identify you, an alternative to a cookie.
- Response swapping / replay: capturing a genuine successful reply and sending it again in place of a failure reply.
- Bug bounty: a programme where a company pays researchers for reporting security bugs responsibly.
- Wallet: a stored balance inside the app that pays for rides automatically unless you choose another method.
- Root cause: the underlying mistake that made the bug possible, as opposed to the symptom you see.
- Impact: what an attacker can actually do because of the bug.
- Variant: another place or way the same underlying mistake might appear.