Phone number validation bypass through url path manipulation .
The phone number verification step relied on client-side checks of the URL path rather than validating the OTP, so an attacker could skip OTP entry by navigating directly to the dashboard URL. This allowed setting an arbitrary phone number, including one already used by another user, without verification.
July 10th — first response with a duplicate status ( I thought they’re planning to respond in the next century )
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
The target was a private HackerOne program. The researcher does not name it and refers to it throughout as duplicated.com, because the report was closed as a duplicate of an existing valid report. The program held sensitive information, including credit card data, according to the author.
The affected feature is phone number verification. Two places in the application ask the user for a phone number and then expect an OTP to be entered on a dedicated verification page:
- the sign-up flow, which ends on a phone verification page before the user reaches the dashboard;
- the account settings flow, where an existing user updates the phone number on the account.
In both cases the application is supposed to confirm that the user controls the number by validating an OTP. The report shows that this confirmation can be skipped entirely.
Setup
No special tooling is described. The researcher worked with a normal account on the target and manipulated the URL in the browser. The only precondition is an account that has passed email validation and completed the account information fields, so that the sign-up flow reaches the phone verification step.
Finding it
The first attempt was response manipulation, changing what the client received in order to make the OTP check pass. That did not work.
The observation that led to the bug was behavioural: after submitting a phone number, the OTP validation page redirected the user to the dashboard page. The researcher then changed the path in the URL by hand, from the phone validation page to the dashboard, and was taken straight to the dashboard. Checking the account settings afterwards showed the new phone number stored on the account, marked as validated, without any OTP having been entered.
Exploitation
Step 1: create and prepare an account
- Create an account and validate the email.
- Complete the account information fields.
- Set any phone number, including one already used by another user.
- The application sends the user to a URL of this shape:
https://www.duplicated.com/signup/phone-verification
Step 2: skip the verification page
With the browser sitting on the phone verification URL, replace the path with the dashboard path and press enter:
https://www.duplicated.com/dashboard
The researcher was redirected to the dashboard page. The phone number entered in step 1 is then visible in the account information, stored as validated, even though no OTP was ever submitted.
Step 3: repeat through account settings
- Go to the account settings and change the phone number to another one, including a number already used by another user.
- Perform the same path change as in the sign-up flow.
- The phone number is updated and marked as validated.
The same weakness therefore exists in both endpoints: the sign-up phone verification and the account information update.
Root cause
The application does not validate the OTP itself. It relies on client-side validation that checks where the user came from, It relies on client-side validation that checks where the user came from, so changing the URL path is enough to satisfy it. Because the check lives on the client and is based on the referring location rather than on a server-side verification of the OTP, changing the URL path is enough to satisfy it.
Impact
The author is explicit that the two scenarios differ.
In the sign-up scenario the impact is limited: an attacker can register an account using someone else's phone number without that person's permission. The author still considers this relevant on a program holding sensitive data such as credit cards, since a user would not want their number used without consent.
In the account settings update scenario the author calls the impact critical. From a victim's perspective, an attacker who has broken into an account can enable 2FA on it, or can use the password reset functionality to break in again each time the victim recovers the account. The author also notes that if the phone number update process were reachable through a CSRF vulnerability on a site that does not validate the OTP, this would be a clear and easy account takeover.
Fix
The report does not describe any fix applied by the program. The change it implies is that the OTP must be validated on the server, and that access to the post-verification state must depend on that server-side result rather than on the path or origin the client presents.
Variants to test
- On any flow with a dedicated verification step, replace the verification path with the path of the page that follows it. A positive result is reaching the post-verification page and seeing the unverified value stored as verified in the account.
- Apply the same path substitution to account settings changes that require confirmation, such as phone number, email address or 2FA enrolment. A positive result is the new value being saved and marked confirmed without the confirmation code.
- Try response manipulation first, as the author did; if it fails, fall back to path manipulation.
Timeline
The report was submitted on 3 June. The first response came on 10 July, closing it as a duplicate.
What happened, in plain words
A security researcher found a way to skip a phone number check on a website. The site asked users to prove they owned a phone number by typing a short code sent to that phone. The researcher discovered that simply editing the address bar of the browser, changing one part of the web address, made the site believe the code had been entered correctly. The phone number was then saved on the account and shown as verified, even though no code was ever typed.
This worked in two places: when a new user signs up, and when an existing user changes the phone number in their account settings. The second case is the more serious one, because a phone number is often used to recover an account or to receive a second login code.
The vulnerability was found on one of HackerOne's private programs, a platform where companies invite researchers to test their systems. The researcher is not allowed to name the company, so throughout the report the site is called duplicated.com. The report was closed as a duplicate, meaning someone else had already reported the same issue.
According to the author, the program held sensitive information, including credit card data.
The feature being attacked
The affected feature is phone number verification. Two parts of the application ask for a phone number and then expect the user to type a one-time code, called an OTP, on a dedicated verification page:
- the sign-up flow, which ends on a phone verification page before the user reaches the dashboard;
- the account settings flow, where an existing user updates the phone number on the account.
In both cases the application is supposed to confirm that the user really controls the number by checking that OTP. The report shows that this confirmation can be skipped entirely.
What an OTP is
OTP stands for one-time password. It is a short code, usually a handful of digits, that a service sends to your phone by text message (or generates in an app). You type it into the site to prove the phone is yours. The important property is that the code is meant to be checked by the server, the computer that runs the website, because only the server knows which code it sent. If the check happens somewhere the user can influence, the whole point is lost. A useful comparison: a bouncer at a club checks your ID at the door. If instead the club trusted a sign you hung on yourself saying "I am over 18", anyone could make one.
What a dashboard is
The dashboard is the main page you see after logging in, the starting point of the application once you are a recognised user. Reaching it normally means you have completed whatever steps the site requires.
Setup
No special tooling is described. The researcher worked with a normal account on the target and manipulated the URL in the browser. The only precondition is an account that has passed email validation and completed the account information fields, so that the sign-up flow reaches the phone verification step.
In other words, you do not need to install anything or write any program. Everything here can be done by a person with a browser, an account, and the willingness to edit the address bar.
Finding it
The first attempt was response manipulation, changing what the client received in order to make the OTP check pass. That did not work.
What response manipulation means
When your browser asks a website for something, the website sends back a response: a page, some data, a status. Response manipulation means intercepting that response on its way to the browser and altering it, for example flipping a "verification failed" answer into a "verification succeeded" one. It is a common trick when a site does its checking in the browser rather than on the server. Here it did not work.
The observation that led to the bug was behavioural: after submitting a phone number, the OTP validation page redirected the user to the dashboard page. The researcher then changed the path in the URL by hand, from the phone validation page to the dashboard, and was taken straight to the dashboard. Checking the account settings afterwards showed the new phone number stored on the account, marked as validated, without any OTP having been entered.
What a URL path is
A web address has parts. In https://www.duplicated.com/signup/phone-verification, the https:// says how to talk to the site, www.duplicated.com is the site's name, and /signup/phone-verification is the path, which tells the site which page you want. Changing the path is like changing the room number in a building: same building, different door. The researcher simply typed a different room number.
Exploitation
Step 1: create and prepare an account
- Create an account and validate the email.
- Complete the account information fields.
- Set any phone number, including one already used by another user.
- The application sends the user to a URL of this shape:
https://www.duplicated.com/signup/phone-verification
What each part does:
https://is the secure version of the protocol browsers use to fetch pages.www.duplicated.comis the placeholder name for the site./signup/phone-verificationis the path of the page that asks for the OTP.
Why these steps: the researcher needed an account that had reached the phone verification stage, because that is where the weakness lives. Setting a phone number that already belongs to another user is part of the test: if the site accepts it without a code, it is not really checking ownership.
Step 2: skip the verification page
With the browser sitting on the phone verification URL, replace the path with the dashboard path and press enter:
https://www.duplicated.com/dashboard
Line by line:
https://www.duplicated.comis the same site as before./dashboardis the path of the main page you normally only see after verification.
The only change is the path. The researcher did not send a code, did not intercept anything, and did not use a tool. Pressing enter took the researcher to the dashboard page. The phone number entered in step 1 is then visible in the account information, stored as validated, even though no OTP was ever submitted.
Why this step matters: it shows the verification step could be skipped by changing the path. The browser's address bar was enough to change that answer.
Step 3: repeat through account settings
- Go to the account settings and change the phone number to another one, including a number already used by another user.
- Perform the same path change as in the sign-up flow.
- The phone number is updated and marked as validated.
The same weakness therefore exists in both endpoints: the sign-up phone verification and the account information update.
What an endpoint is
An endpoint is a specific address on a server that does one job, like a counter in a large office. One counter handles sign-up, another handles changing your account details. Here, both counters had the same flaw.
Root cause
The application does not validate the OTP itself. It relies on client-side validation that checks where the user came from, so a request that arrives with the right path, or a user who simply navigates to the dashboard path, is treated as having completed verification. Because the check lives on the client and is based on the referring location rather than on a server-side verification of the OTP, changing the URL path is enough to satisfy it.
Client side versus server side
Client side means the check happens in your browser, on your computer, where you have control. Server side means the check happens on the company's computer, where you do not. A check that lives in the browser is like a self-marked exam: you can change the answers before handing it in. A check that lives on the server is like an exam marked by the teacher. The fix implied by this report is to move the OTP check to the server, and to make access to the post-verification state depend on that server-side result rather than on the path or origin the client presents.
Impact
The author is explicit that the two scenarios differ.
In the sign-up scenario the impact is limited: an attacker can register an account using someone else's phone number without that person's permission. The author still considers this relevant on a program holding sensitive data such as credit cards, since a user would not want their number used without consent.
In the account settings update scenario the author calls the impact critical. From a victim's perspective, an attacker who has broken into an account can enable 2FA on it, or can use the password reset functionality to break in again each time the victim recovers the account. The author also notes that if the phone number update process were reachable through a CSRF vulnerability on a site that does not validate the OTP, this would be a clear and easy account takeover.
The terms in that paragraph
- 2FA, two-factor authentication, means logging in with two things: your password plus a second proof such as a code on your phone. If an attacker can attach their own phone number to your account without proving they own it, they can receive that second code themselves.
- Password reset is the feature that lets you regain access when you forget your password, usually by sending a code or link to your phone or email. If the phone number on the account is one the attacker controls, the reset goes to the attacker.
- CSRF, cross-site request forgery, is a trick where a malicious page makes your browser send a request to another site where you are logged in, without you intending it. It is like someone quietly slipping a signed form into a pile you are about to hand in.
- Account takeover means an attacker ends up in full control of someone else's account.
Fix
The report does not describe any fix applied by the program. The change it implies is that the OTP must be validated on the server, and that access to the post-verification state must depend on that server-side result rather than on the path or origin the client presents.
Variants to test
These are the same ideas applied elsewhere, for anyone learning to look for this kind of bug:
- On any flow with a dedicated verification step, replace the verification path with the path of the page that follows it. A positive result is reaching the post-verification page and seeing the unverified value stored as verified in the account.
- Apply the same path substitution to account settings changes that require confirmation, such as phone number, email address or 2FA enrolment. A positive result is the new value being saved and marked confirmed without the confirmation code.
- Try response manipulation first, as the author did; if it fails, fall back to path manipulation.
Timeline
The report was submitted on 3 June. The first response came on 10 July, closing it as a duplicate.
Glossary
- OTP (one-time password): a short code sent to your phone or generated by an app, used once to prove you control that phone.
- Phone number verification: the step where a site confirms a phone number belongs to you, usually by checking an OTP.
- Bug bounty program: an arrangement where a company invites researchers to test its systems and report flaws, sometimes for a reward.
- HackerOne: a platform that hosts bug bounty programs.
- Private program: a bug bounty program that only invited researchers can see and test.
- Duplicate: a report describing a flaw that has already been reported; it is closed without separate handling.
- Sign-up flow: the sequence of pages a new user goes through to create an account.
- Dashboard: the main page you see after logging in, normally reachable only once required steps are done.
- Account settings: the pages where a logged-in user views and changes their account details.
- Endpoint: a specific address on a server that performs one job, such as handling sign-up or an account update.
- URL: the web address you see in the browser's address bar.
- URL path: the part of a web address after the site name, such as
/dashboard, that selects which page you want. - URL path manipulation: editing that path by hand to reach a page you were not meant to reach yet.
- Client: your browser and computer, the side you control.
- Server: the company's computer that runs the website and holds the data.
- Client-side validation: a check performed in your browser, which you can influence or bypass.
- Server-side validation: a check performed on the company's computer, which you cannot directly alter.
- Response manipulation: intercepting and altering what the server sends back to the browser.
- Redirect: when a site automatically sends your browser from one page to another.
- 2FA (two-factor authentication): logging in with two proofs, typically a password plus a code on your phone.
- Password reset: the feature that lets you regain access to an account, often by sending a code to a phone or email.
- CSRF (cross-site request forgery): a trick that makes your logged-in browser send a request to another site without your intent.
- Account takeover: an attacker gaining full control of someone else's account.
- Root cause: the underlying reason a flaw exists, as opposed to its visible symptom.