Change phone number OTP flaw leads to any phone number takeover
The app's phone number change feature accepted the OTP code 0000 for any new number, allowing an attacker to bind an arbitrary phone number to an account. This could lead to account takeover or account deletion.
- Triaged in 5 hours
- Fixed in 3 months
- Paid in 8 days
- Disclosed after 3 months
Summary by the program
The report
Summary:
Dear Indrive,
Ive found another valid report, the app allows any user to change the app phone number, but a flaw within the otp allows any number to be added into the account!
When an user requests a phone number change inside the app, it will send a 4 digit code but if you place 0000, it will accept any number and update it into the app!!
Steps To Reproduce:
- Click setting in the account
- Click into the phone number and change for a new one
- Input 0000 as the otp code
Phone number added!!
VIDEO POC
████████
At the end you can see i was trying to pick a number from my contacts but instead i just use a random phone number and works!!
Remediation: Make sure the otp doesnt accept 0000 or other invalid codes
Let me know if anything,
Regards,
Polem4rch
Impact
Any attacker can use the phone number for an account takeover or delete anyone account, or cancelling trips
Context
The target is inDrive, and the asset in scope is *.indriverapp.com. The feature involved is the phone number change flow inside the app: a signed-in user opens their account settings, requests a change to a new phone number, and the app sends a four digit one-time code to confirm that the new number belongs to them. Only after that code is verified should the number be attached to the account.
The report describes a business logic flaw in that verification step. The OTP check accepts a fixed value, 0000, for any number, so the confirmation step no longer proves ownership of the new number at all.
Setup
The report does not describe any special setup. No particular account type, role, tool, app version or configuration is mentioned. The only precondition visible from the steps is an account in the app from which the phone number change can be started, plus the ability to enter a code when prompted. The researcher introduces the finding as another valid report.
Finding it
The researcher was testing the phone number change flow and noticed that the app asks for a four digit code after a new number is submitted. Submitting 0000 confirmed it: the app accepted the code and updated the account with the new number, regardless of which number had been entered.
In the researcher's words, the app allows any user to change the app phone number, but a flaw within the OTP allows any number to be added into the account.
Exploitation
Step 1: Open the settings
In the account, open the settings section.
Step 2: Start a phone number change
Open the phone number entry and request a change to a new number. The app then sends a four digit code as part of the normal flow.
Step 3: Submit 0000 as the code
Enter the following value where the OTP is requested:
0000
The app accepts it and the new phone number is added to the account. No code that was actually delivered to the new number is needed.
The researcher recorded a video proof of concept. In it, an attempt to pick a number from contacts is shown, and then a random phone number is used instead; that random number is accepted and attached to the account.
Root cause
The verification step treats 0000 as a valid code for any pending phone number change. The report does not show the implementation, so the exact mechanism is unknown. The report does not include the server side code, so the exact implementation mistake is not shown; the behaviour is consistent with a hardcoded or default accepted value in the OTP validation logic.
Whatever the mechanism, the defence that the flow relies on, possession of the new number, is bypassed entirely. The researcher's own remediation note points at the same place: make sure the OTP does not accept 0000 or other invalid codes.
Impact
Because any number can be attached to an account without proving ownership, an attacker can bind a number they control, or a number belonging to someone else, to an account. The researcher states that any attacker can use the phone number for an account takeover or delete anyone's account, or cancel trips.
Fix
The report recommends that the OTP validation reject 0000 and any other invalid codes. More generally, the code submitted must be checked against the code actually generated for that specific pending change, and the change must only complete when they match.
Variants to test
- Submit
0000(and other trivial patterns such as repeated digits) at every OTP prompt in the product: sign-up, login, password reset, phone change, email change. A positive result is the action completing without the real code. - Request a change to a number you do not control, then submit a code that was delivered to a number you do control. A positive result is the change completing, which shows the code is not bound to the pending number.
- Reuse a previously valid code for a new pending change. A positive result is the second change completing with the old code.
- Try the same fixed value on other confirmation flows that use short numeric codes, such as withdrawal or payment confirmation. A positive result is the operation completing without the genuine code.
Hunting notes
This kind of bug hides in flows where a short numeric code gates a sensitive change: phone number change, email change, password reset and payment confirmation. During recon, map every place the product asks for a code and note the code length and whether the flow is tied to a specific pending value. The signal that matters is a verification step that can be satisfied without receiving anything on the target number or address.
The report was accepted as critical with a CVSS of 9.8 and a bounty of 2000 USD, and was disclosed on 2024-10-09. The video shows a random number, not one from the tester's contacts, being accepted and attached to the account.
What happened, in plain words
Every account in the app is tied to a phone number.
Because the phone number matters so much, the app has a built-in safety step when you want to change it. You type the new number, and the app sends a short code to that new number by SMS. You then type the code back into the app. If the code matches, the app concludes that you really do hold the new number, and it attaches it to your account. This kind of short code is called a one-time password, or OTP. The whole point is that only someone who can read messages on the new number can complete the change.
The researcher, polem4rch, found that this safety step could be skipped. Instead of typing the real code that arrived by SMS, you can type four zeros:
0000
The app accepts that value for any phone number at all. So the confirmation step stops proving anything. Anyone with an account can attach any phone number they like, including a number that belongs to somebody else, without ever receiving a message on it.
The report was accepted as critical, with a CVSS score of 9.8 and a bounty of 2000 USD, and was disclosed on 2024-10-09.
The target and the feature
The asset in scope is *.indriverapp.com. The asterisk is a wildcard: it means every subdomain of indriverapp.com was fair game, for example something.indriverapp.com. A subdomain is just a smaller name placed in front of the main domain, the way a department name sits in front of a company name.
The feature under test is the phone number change flow inside the app. In plain terms, the sequence is:
- A signed-in user opens their account settings.
- The user asks to change the phone number to a new one.
- The app sends a four digit one-time code to the new number.
- The user types that code into the app.
- Only if the code is correct should the new number be attached to the account.
Step 5 is the lock on the door. The report describes a flaw in that lock: the check accepts a fixed value, 0000, for any number, so the confirmation no longer proves that the person owns the new number at all.
This kind of problem is called a business logic error. Most security bugs are about technical breakage, such as a program crashing or a password being stored badly. A business logic error is different: the software works exactly as written, but the rules it enforces are wrong. A useful comparison is a club doorman who is told to check invitations. He checks them diligently, but somebody told him that a blank piece of paper counts as an invitation, so anyone can walk in with a blank sheet. Nothing is broken; the rule itself is bad.
Setup
The report does not describe any special setup. No particular account type, role, tool, app version or configuration is mentioned. The only precondition visible from the steps is an account in the app from which the phone number change can be started, plus the ability to enter a code when prompted.
The researcher introduces the finding as another valid report. That is a common habit in security work: when one bug is found in a feature, the feature is worth a second and third look, because the same code is often weak in more than one place.
Finding it
The researcher was testing the phone number change flow and noticed that the app asks for a four digit code after a new number is submitted.
Submitting 0000 confirmed it: the app accepted the code and updated the account with the new number, regardless of which number had been entered.
In the researcher's words, the app allows any user to change the app phone number, but a flaw within the OTP allows any number to be added into the account.
Exploitation
Exploitation means actually using the weakness to make something happen that should not be possible. Here it takes three simple steps inside the app.
Step 1: Open the settings
In the account, open the settings section. This is the normal place where a user manages their profile, including the phone number. Nothing unusual happens here; the researcher is simply walking the path a real user would walk.
Step 2: Start a phone number change
Open the phone number entry and request a change to a new number. The app then sends a four digit code as part of the normal flow. At this point the app has created a pending change: it remembers that this account wants to move to that new number, and it is waiting for proof that the number belongs to the user.
Step 3: Submit 0000 as the code
Enter the following value where the OTP is requested:
0000
This is the whole payload. A payload is the piece of input an attacker sends to try to trigger a weakness; here it is literally four characters. There is no special tool, no script and no trick with the network. The researcher simply types four zeros into the box where the SMS code should go.
The app accepts it and the new phone number is added to the account. No code that was actually delivered to the new number is needed. That last point is the heart of the bug: the app was supposed to require a code that only the holder of the new number could read, and instead it accepted a value that anyone can guess or simply know in advance.
The researcher recorded a video proof of concept. A proof of concept, usually shortened to PoC, is a demonstration that the bug is real, recorded so that the people who run the program can see it happen rather than take it on trust. In the video, an attempt to pick a number from contacts is shown, and then a random phone number is used instead; that random number is accepted and attached to the account. The video shows a random number, not one from the tester's contacts, being accepted.
Root cause
Root cause means the underlying reason the bug exists, as opposed to the visible symptom. The visible symptom is that 0000 is accepted. The root cause is in how the verification step is built.
The verification step treats 0000 as a valid code for any pending phone number change. The report does not show the implementation, so the exact mechanism is unknown. To unpack that: a correct implementation generates a random code, stores it next to the pending change, and compares what the user types against that stored value. If the comparison is skipped, or if a hardcoded value is accepted before the real comparison happens, the check becomes decorative.
The report does not include the server side code, so the exact implementation mistake is not shown; the behaviour is consistent with a hardcoded or default accepted value in the OTP validation logic. A hardcoded value is one written directly into the program by a developer, for example a test value left in by accident. A default value is one that applies when nothing else is set. Either would explain what the researcher saw.
Whatever the mechanism, the defence that the flow relies on, possession of the new number, is bypassed entirely. The researcher's own remediation note points at the same place: make sure the OTP does not accept 0000 or other invalid codes. Remediation means the fix, the change that closes the hole.
Impact
Impact is what an attacker can actually do with the bug, and it is usually the part that decides how serious a report is.
Because any number can be attached to an account without proving ownership, an attacker can bind a number they control, or a number belonging to someone else, to an account. The researcher states that any attacker can use the phone number for an account takeover or delete anyone's account, or cancel trips.
Account takeover means gaining control of somebody else's account. If the phone number is what the product uses to identify you, then whoever holds the number on the account can often receive login codes, reset passwords and act as the account owner. Deleting an account and cancelling trips are further actions that become possible once the number on the account is under someone else's control.
In other words, the report establishes that the number can be swapped without proof; the exact chain from there to a full takeover is not spelled out step by step.
Fix
The report recommends that the OTP validation reject 0000 and any other invalid codes. More generally, the code submitted must be checked against the code actually generated for that specific pending change, and the change must only complete when they match.
A useful comparison for the general fix is a cloakroom ticket. The attendant should compare the ticket you hand back with the one stub kept for your specific coat, not with any ticket at all, and certainly not accept a blank ticket because it is easy to recognise.
Variants to test
Once a weakness like this is found, the natural next question is where else the same pattern might appear. These are the follow-up tests the write-up suggests.
- Submit
0000(and other trivial patterns such as repeated digits) at every OTP prompt in the product: sign-up, login, password reset, phone change, email change. A positive result is the action completing without the real code. The reasoning is that if one code check was built carelessly, others may share the same code or the same habit. - Request a change to a number you do not control, then submit a code that was delivered to a number you do control. A positive result is the change completing, which shows the code is not bound to the pending number. This tests whether the app checks the digits but forgets which number they were meant for.
- Reuse a previously valid code for a new pending change. A positive result is the second change completing with the old code. This tests whether codes are single-use and expire, or whether an old one stays valid forever.
- Try the same fixed value on other confirmation flows that use short numeric codes, such as withdrawal or payment confirmation. A positive result is the operation completing without the genuine code. Money movements are the highest-value place for this kind of mistake.
Hunting notes
This kind of bug hides in flows where a short numeric code gates a sensitive change: phone number change, email change, password reset and payment confirmation. During recon, map every place the product asks for a code and note the code length and whether the flow is tied to a specific pending value. Recon, short for reconnaissance, means the survey work done before testing: listing features, noting where input is accepted and understanding what each input controls. The signal that matters is a verification step that can be satisfied without receiving anything on the target number or address.
The report was accepted as critical with a CVSS of 9.8 and a bounty of 2000 USD, and was disclosed on 2024-10-09. CVSS is a standard scoring system for the severity of a vulnerability, running from 0 to 10, where higher means more dangerous; 9.8 sits in the critical band. A bounty is the payment a company makes to a researcher who reports a valid bug. Disclosed means the report was made public on that date.
The video shows a random number, not one from the tester's contacts, being accepted and attached to the account. A primitive here means a basic building block that can be used to achieve a larger goal: on its own, swapping a number looks like a small oddity, but as a building block for taking over accounts it is serious.
Glossary
- API: the set of rules and addresses a program uses to talk to another program, usually over the internet; think of it as the service counter where requests are handed in and answers come back.
- Asset: the specific system, domain or application that a bug bounty program allows researchers to test.
- Account takeover: gaining control of another person's account, for example by receiving their login codes or resetting their password.
- Bounty: a payment made by a company to a researcher who reports a valid vulnerability.
- Business logic error: a flaw where the software works as written but the rules it enforces are wrong, allowing actions the designer did not intend.
- Code (OTP): a short numeric or alphanumeric value sent to a phone or email to prove the person holds that phone or email.
- Critical: the highest severity band in most scoring systems, meaning the bug can cause severe damage and should be fixed urgently.
- CVSS: a standard scoring system for vulnerability severity, from 0 to 10, where higher is more dangerous.
- Default value: a value that applies automatically when nothing else has been set.
- Disclosed: made public, usually after a fix or after an agreed period.
- Domain: the main name of a website, such as
indriverapp.com. - Exploitation: actually using a weakness to make something happen that should not be possible.
- Hardcoded value: a value written directly into a program by a developer, often a leftover test value.
- Impact: what an attacker can actually do with a bug, and how bad the consequences are.
- One-time password (OTP): a short code meant to be used once, to prove possession of a phone number or email address.
- Payload: the piece of input an attacker sends to try to trigger a weakness.
- Pending change: a requested change the system is holding, waiting for confirmation before it takes effect.
- Phone number change flow: the sequence of screens and checks a user goes through to move their account to a new phone number.
- Proof of concept (PoC): a demonstration that a bug is real, often a video or a short set of steps.
- Recon (reconnaissance): the survey work done before testing, mapping features and inputs.
- Remediation: the fix that closes a vulnerability.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- Scope: the boundary of what a bug bounty program allows researchers to test.
- Subdomain: a smaller name placed in front of a main domain, such as
something.indriverapp.com. - Wildcard: in a scope entry, a symbol such as
*that stands for any name in that position, so*.indriverapp.comcovers every subdomain. - Vulnerability: a weakness in software that an attacker can use to do something harmful.