Account Takeover because of the mis-configuration on the Password Reset Page
The password reset verification endpoint lacked rate limiting, allowing an attacker to brute-force the 4-character verification code. With the victim's email address, an attacker could try all possible codes and take over the account.
- Triaged in 19 days
- Fixed in 4 months
- Paid in 55 days
- Disclosed after 4 months
Summary by the program
Summary
https://api.account.opendoor.ltd has no rate-limit on the password reset's verification page. By this, I can take over any account. All I need to know is victim's email address.
Step to reproduce
- There is an endpoint ->
POST /v1/verification-code/forgot-passwordwhich will take POST data in the format
{
"email": "[email protected]",
"device_id": "helloworld"
}
Give your email address and any device_id you need.
-
And there is another endpoint ->
POST /v1/verification-code/authwhere the user needs to enter the verification code sent to his email address so that he can reset his password. This endpoint accepts the data as{"code": "TEST","device_id": "helloworld"}. Just give the same device_id that you've given in step 1. -
I've observed that you're generating a 4 character verification code with the combination of upper-case alphabets and the numbers. So I need to generate all the possible combinations of that 4 character verification code. That will be a total of 1679616 combinations. For the sake of demonstration, I'll just take around 1000 combinations to do the attack. But it is possible to run all the 1679616 combinations on cloud services like AWS, etc, easily.
-
After you make the request on
POST /v1/verification-code/forgot-password endpointfor the victim's email address, visitPOST /v1/verification-code/auth endpointand enter the samedevice_id enteredonPOST /v1/verification-code/auth -
Send the request to Intruder.
-
Add the attack point at the verification code.
-
In the payloads section, add around 1000 combinations of 4 character verification codes. Add the correct verification code at the end so that we can prove that the bug exists. And set the thread count to a high value so that the attack will be a bit faster.
-
Start the attack.
After all those requests are made, you'll notice that, for the correct verification code, the response will be 200 OK while the wrong verification code's response will give you a 401 Unauthorized.
Context
The target is api.account.opendoor.ltd, the account API behind the Clario product. The feature in scope is the password reset flow, which is split across two endpoints on that host:
POST /v1/verification-code/forgot-password, which starts the reset by taking an email address and adevice_id.POST /v1/verification-code/auth, which checks the verification code that was sent to the email address and, on success, lets the user reset the password.
Normally the second endpoint is the gate that protects the reset: only someone who can read the victim's mailbox knows the code, so only they can finish the reset. The report shows that this gate can be brute forced because the verification endpoint has no rate limit.
Setup
The researcher needed only two things: the victim's email address and a device_id of their choosing. No account on the victim's side, no access to the mailbox and no special tooling beyond an intercepting proxy with an Intruder-style attack feature. The device_id value used throughout the report is helloworld, and the email address used in the example payload is [redacted].
Finding it
The researcher observed that the verification code generated for a password reset is four characters long and is built from upper-case letters and digits. That gives a keyspace of 1679616 combinations, which is small enough to enumerate. The second observation is that POST /v1/verification-code/auth does not rate-limit attempts, so an attacker can submit guesses as fast as the server will answer them. Together these two facts turn the reset flow into an account takeover primitive: knowing the victim's email address is enough.
Exploitation
Step 1: request a reset for the victim
There is an endpoint that starts the flow:
POST /v1/verification-code/forgot-password
It takes POST data in this format:
{
"email": "[redacted]",
"device_id": "helloworld"
}
The email address is the one the reset is started for. The device_id is any value the attacker picks; it only has to be reused later. This call starts the reset and causes the server to send a verification code to that email address.
Step 2: understand the verification endpoint
There is a second endpoint that consumes the code:
POST /v1/verification-code/auth
The user is supposed to enter the verification code that was sent to their email address so that they can reset their password. The endpoint accepts data in this shape:
{"code": "TEST","device_id": "helloworld"}
The device_id must be the same one that was sent in step 1. The code field is the value to attack.
Step 3: build the candidate list
Because the code is four characters drawn from upper-case letters and digits, the full space is 1679616 combinations. For the demonstration the researcher used around 1000 combinations rather than the full set, noting that running all 1679616 against cloud services such as AWS is easily possible.
Step 4: prepare the request
After making the request to POST /v1/verification-code/forgot-password for the victim's email address, the attacker visits POST /v1/verification-code/auth and enters the same device_id that was used in the first request.
Step 5: send it to Intruder
The prepared request is sent to Intruder.
Step 6: set the attack point
The attack point is placed on the verification code.
Step 7: configure the payloads
In the payloads section, around 1000 combinations of four-character verification codes are added. The correct verification code is placed at the end of the list so that the attack proves the bug exists. The thread count is set to a high value so that the attack runs faster.
Step 8: run the attack
Once all the requests are made, the responses separate cleanly: the correct verification code returns 200 OK, while wrong verification codes return 401 Unauthorized. That difference is the signal that the code has been found, and with it the attacker can complete the password reset and take over the account.
Root cause
The design flaw is that the verification code is short (four characters from a 36-symbol alphabet) and the endpoint that checks it, POST /v1/verification-code/auth, has no rate limit. A four-character code is only safe if the number of attempts is capped, because the keyspace of 1679616 is small enough to enumerate. The report does not describe any other defence on the endpoint, such as lockout, attempt counting or CAPTCHA, so the absence of rate limiting is the whole of the story as presented. The device_id binding does not help: the attacker chooses it and reuses it, so it ties the two requests together without proving anything about the attacker.
Impact
An attacker who knows a victim's email address can take over that account. The report states this without qualification: any account, given the email address. The practical constraint is time and request volume, since the full keyspace is 1679616 attempts; the researcher notes that this is feasible on cloud infrastructure. The program rated the issue medium with a CVSS score of 4.8 and paid a bounty of 300.00 USD.
Fix
The report does not describe a fix. The measure that follows from the finding is to rate-limit and lock out POST /v1/verification-code/auth per account and per device_id, so that a small number of wrong codes ends the attempt, and to lengthen the verification code so that the keyspace is not enumerable even at moderate request rates.
Variants to test
- Apply the same brute-force approach to any other endpoint that checks a short numeric or alphanumeric code: password reset, email verification, login second factor, phone verification. A positive result is a correct guess returning a different status or body from wrong guesses, with no lockout after many attempts.
- Test whether the code is bound to the
device_idin any meaningful way by starting the reset with onedevice_idand submitting codes with another. A positive result is that the code is still accepted, which removes even the weak binding described here. - Test whether the code survives a new reset request, so that an attacker can keep a known code alive while enumerating. A positive result is that an old code still validates after a fresh
forgot-passwordcall. - Test the response difference itself: if wrong codes return
401and the right one returns200, check whether timing or body length also leaks progress. A positive result is any observable difference that lets an attacker narrow the search without a full enumeration.
Hunting notes
This kind of bug hides in account APIs that split a flow across several endpoints, where the first endpoint issues a short secret and the second checks it. During recon, look for hosts such as api.account.* that serve authentication flows, and map the endpoints around forgot-password, verification-code and auth. The signals that matter are a short code length (four to six characters), an alphabet of digits and letters, and a verification endpoint that answers quickly and consistently to wrong guesses. The way the researcher showed impact here was simple and effective: a small batch of guesses with the correct code placed at the end, so the response split between 200 OK and 401 Unauthorized is visible in a single attack run. The demonstration shows the response split between 200 OK and 401 Unauthorized in a single attack run.
What happened, in plain words
Clario is a product with user accounts, and those accounts live behind a web service at api.account.opendoor.ltd. Like most account systems, it has a "forgot my password" feature. You type your email address, the service emails you a short code, you type that code back in, and then you are allowed to set a new password.
The whole security of that feature rests on one idea: only the person who can read the email inbox knows the code. If you cannot read the inbox, you cannot finish the reset.
This report shows that the second half of that feature, the part that checks the code, will happily accept guesses all day long. It never says "too many tries, come back later". The code is only four characters long, made of upper-case letters and digits, so there are 1679616 possible codes. That sounds like a lot, but a computer can send guesses far faster than a person can type them, and the researcher notes that cloud services such as AWS could run the full set easily. If you know a victim's email address, you can start a reset for them, then guess codes until one is accepted, then set a new password and own the account.
The program rated it medium severity, CVSS 4.8, and paid a bounty of 300.00 USD.
Background you need first
A few ideas come up constantly below, so here they are from zero.
API. An API is the part of a website that programs talk to, rather than people. When you click a button in a browser, the page often sends a small message behind the scenes to a server and gets a short answer back. That message-and-answer service is the API. Think of a restaurant: the menu and the waiter are the API, the kitchen is the server. You do not walk into the kitchen yourself; you ask the waiter, and the waiter brings back a result.
Endpoint. An endpoint is one specific address inside an API that does one specific job, like one counter in a large office. POST /v1/verification-code/forgot-password is one endpoint; POST /v1/verification-code/auth is another. The POST part is the method, which just means "I am sending data to you", as opposed to GET, which means "give me a page".
JSON. The data sent to these endpoints is written in JSON, a simple text format for labelled values. It looks like {"name": "value"}, with curly braces around the whole thing, quotes around the labels and text values, and commas between entries. It is just a tidy way of writing a list of facts.
Verification code. A short secret that is sent to your email or phone to prove you control it. Also called a one-time code or OTP. It is one-time because it should stop working after it is used or after a short time.
Brute force. Trying every possible answer until one works, instead of being clever. Like a person with a big ring of keys trying each key in a lock in turn. It only works when the number of possible answers is small and nothing stops you trying again and again.
Keyspace. The total number of possible values a secret can take. If a code is four characters and each character can be one of 36 symbols (26 upper-case letters plus 10 digits), the keyspace is 36 × 36 × 36 × 36 = 1679616. The smaller the keyspace, the fewer guesses an attacker needs.
Rate limit. A rule that says "you may only do this a certain number of times in a certain period". A login page that locks you out after five wrong passwords has a rate limit. Without one, a computer can guess as fast as the server will answer.
Account takeover. Exactly what it sounds like: an attacker ends up in control of someone else's account, usually by getting a password reset through.
HTTP status codes. Every API answer carries a number that summarises what happened. 200 OK means "fine, here is your result". 401 Unauthorized means "you are not allowed, that was wrong". These numbers matter later, because they are how the attacker spots the correct guess.
Intercepting proxy and Intruder. A proxy is a tool that sits between your browser and the server so you can see and edit the messages going back and forth. Intruder is a feature of one such tool (Burp Suite) that takes one request, marks a spot in it, and sends it again and again with a different value in that spot each time. It is the mechanical key-trying ring, automated.
The target and the feature
The target is api.account.opendoor.ltd, the account API behind the Clario product. The feature in scope is the password reset flow, and it is split across two endpoints on that host:
POST /v1/verification-code/forgot-password, which starts the reset by taking an email address and adevice_id.POST /v1/verification-code/auth, which checks the verification code that was sent to the email address and, on success, lets the user reset the password.
Normally the second endpoint is the gate that protects the reset: only someone who can read the victim's mailbox knows the code, so only they can finish the reset. The report shows that this gate can be brute forced because the verification endpoint has no rate limit.
What the researcher needed
Only two things: the victim's email address and a device_id of their choosing. No account on the victim's side, no access to the mailbox, and no special tooling beyond an intercepting proxy with an Intruder-style attack feature.
The device_id value used throughout the report is helloworld, and the email address used in the example payload is [redacted].
A device_id is a label the client sends to identify which device is talking. It is not a password and it is not secret; here the attacker simply picks one and reuses it. Keep that in mind, because it becomes important at the end.
Finding it
The researcher observed two things.
First, the verification code generated for a password reset is four characters long and is built from upper-case letters and digits. That gives a keyspace of 1679616 combinations, which is small enough to enumerate.
Second, POST /v1/verification-code/auth does not rate-limit attempts, so an attacker can submit guesses as fast as the server will answer them.
Together these two facts turn the reset flow into an account takeover primitive: knowing the victim's email address is enough. Neither fact is dangerous alone. A short code is fine if you only get five tries. Unlimited tries are fine if the code is long enough that guessing is hopeless. Put them together and the gate opens.
Exploitation, step by step
Step 1: request a reset for the victim
There is an endpoint that starts the flow:
POST /v1/verification-code/forgot-password
This line names the endpoint and the method. POST means data is being sent to it, and the path after the host says which job this endpoint does: it handles the "forgot password" request.
It takes POST data in this format:
{
"email": "[redacted]",
"device_id": "helloworld"
}
Line by line: the outer curly braces wrap the whole message. "email" is the label, and the value after the colon is the address the reset should be sent to. "device_id" is the second label, with the value helloworld. The email address is the one the reset is started for. The device_id is any value the attacker picks; it only has to be reused later.
Why this step: this call causes the server to send a four-character verification code to the victim's email address. The attacker cannot read that email, so they do not know the code. But the call also puts the server into a state where it is expecting a code to be checked, and that is the state the attacker is about to attack.
Step 2: understand the verification endpoint
There is a second endpoint that consumes the code:
POST /v1/verification-code/auth
Same shape as before: a POST to a path whose name says it authorises a verification code.
The user is supposed to enter the verification code that was sent to their email address so that they can reset their password. The endpoint accepts data in this shape:
{"code": "TEST","device_id": "helloworld"}
Here "code" holds the guess, shown as TEST as a placeholder, and "device_id" holds the same label as before. The device_id must be the same one that was sent in step 1, which is how the server ties the two requests together into one reset attempt. The code field is the value to attack: it is the one field that will change on every guess.
Why this step matters: this is the gate. Everything the attacker does from here is aimed at this one field.
Step 3: build the candidate list
Because the code is four characters drawn from upper-case letters and digits, the full space is 1679616 combinations. For the demonstration the researcher used around 1000 combinations rather than the full set, noting that running all 1679616 against cloud services such as AWS is easily possible.
The researcher used around 1000 combinations for the demonstration rather than the full set. A thousand tries is enough to prove that, and it keeps the demonstration quick and harmless. The full set is the same attack at a larger scale.
Step 4: prepare the request
After making the request to POST /v1/verification-code/forgot-password for the victim's email address, the attacker visits POST /v1/verification-code/auth and enters the same device_id that was used in the first request.
Why: the attacker needs one real, working request to the second endpoint, captured in the proxy, so that it can be replayed with different codes. The report says to reuse the same device_id that was given in step 1.
Step 5: send it to Intruder
The prepared request is sent to Intruder.
Why: Intruder is the part of the proxy that repeats a request many times, swapping one value each time. Doing a thousand guesses by hand is not realistic; this automates it.
Step 6: set the attack point
The attack point is placed on the verification code.
Why: the attack point tells Intruder which part of the request to replace on each attempt. Everything else in the request, including the device_id, stays exactly as it was, so each guess looks like a normal attempt from the same device.
Step 7: configure the payloads
In the payloads section, around 1000 combinations of four-character verification codes are added. The correct verification code is placed at the end of the list so that the attack proves the bug exists. The thread count is set to a high value so that the attack runs faster.
Why the correct code at the end: it is the control. If the attack ends with one response that looks different from all the others, the researcher has shown in a single run that wrong guesses are rejected and the right guess is accepted. Without that, a run of a thousand rejections would prove nothing.
Why a high thread count: threads are how many requests are in flight at once. More threads means the list is worked through faster. It also underlines the point of the report: nothing on the server slows the attacker down.
Step 8: run the attack
Once all the requests are made, the responses separate cleanly: the correct verification code returns 200 OK, while wrong verification codes return 401 Unauthorized. That difference is the signal that the code has been found, and with it the attacker can complete the password reset and take over the account.
In plain terms: a thousand answers come back saying "wrong", and one comes back saying "correct". The attacker reads that one answer, now knows the code, and finishes the reset with it. The attacker can now complete the password reset and take over the account.
Why it works
The design flaw is that the verification code is short (four characters from a 36-symbol alphabet) and the endpoint that checks it, POST /v1/verification-code/auth, has no rate limit. A four-character code is only safe if the number of attempts is capped, because the keyspace of 1679616 is small enough to enumerate.
The report does not describe any other defence on the endpoint, such as lockout, attempt counting or CAPTCHA, so the absence of rate limiting is the whole of the story as presented.
The device_id binding does not help. The attacker chooses it and reuses it, so it ties the two requests together without proving anything about the attacker. It is like a form that asks you to make up a reference number and then quote it back: it keeps your two visits linked, but it does not tell anyone who you are.
Impact
An attacker who knows a victim's email address can take over that account. The report states this without qualification: any account, given the email address.
The practical constraint is time and request volume, since the full keyspace is 1679616 attempts; the researcher notes that this is feasible on cloud infrastructure. The program rated the issue medium with a CVSS score of 4.8 and paid a bounty of 300.00 USD.
Fix
The report does not describe a fix. The measure that follows from the finding is to rate-limit and lock out POST /v1/verification-code/auth per account and per device_id, so that a small number of wrong codes ends the attempt, and to lengthen the verification code so that the keyspace is not enumerable even at moderate request rates.
In everyday terms: give the lock a limit on how many keys you may try, and make the lock need a much longer key.
Variants to test
Once you understand this bug, you can look for it elsewhere. Each of these is the same idea pointed at a different door.
- Apply the same brute-force approach to any other endpoint that checks a short numeric or alphanumeric code: password reset, email verification, login second factor, phone verification. A positive result is a correct guess returning a different status or body from wrong guesses, with no lockout after many attempts.
- Test whether the code is bound to the
device_idin any meaningful way by starting the reset with onedevice_idand submitting codes with another. A positive result is that the code is still accepted, which removes even the weak binding described here. - Test whether the code survives a new reset request, so that an attacker can keep a known code alive while enumerating. A positive result is that an old code still validates after a fresh
forgot-passwordcall. - Test the response difference itself: if wrong codes return
401and the right one returns200, check whether timing or body length also leaks progress. A positive result is any observable difference that lets an attacker narrow the search without a full enumeration.
Hunting notes
This kind of bug hides in account APIs that split a flow across several endpoints, where the first endpoint issues a short secret and the second checks it. During recon, look for hosts such as api.account.* that serve authentication flows, and map the endpoints around forgot-password, verification-code and auth.
The signals that matter are a short code length (four to six characters), an alphabet of digits and letters, and a verification endpoint that answers quickly and consistently to wrong guesses.
The way the researcher showed impact here was simple and effective: a small batch of guesses with the correct code placed at the end, so the response split between 200 OK and 401 Unauthorized is visible in a single attack run. The demonstration shows the response split between 200 OK and 401 Unauthorized in a single attack run.
Glossary
- API: the part of a service that programs talk to, sending requests and receiving answers, rather than pages meant for a human to read.
- Endpoint: one specific address inside an API that performs one specific job.
- POST: an HTTP method meaning "I am sending data to you", used for the requests in this report.
- JSON: a plain-text format for labelled values, written with curly braces, quotes and commas.
- HTTP status code: the number in every API answer that summarises the result, such as
200 OKfor success and401 Unauthorizedfor a rejected attempt. - Verification code (OTP): a short one-time secret sent to your email or phone to prove you control it.
- Keyspace: the total number of possible values a secret can take; here 1679616 for a four-character code over 36 symbols.
- Brute force: trying every possible answer until one works.
- Rate limit: a cap on how many times an action may be performed in a period, which is what stops brute force.
- Lockout: a stronger form of rate limiting where repeated failures stop further attempts altogether.
- CAPTCHA: a challenge meant to be easy for a person and hard for a program, used to slow automated guessing.
- Account takeover: an attacker gaining control of someone else's account, here by completing a password reset.
device_id: a label the client sends to identify which device is talking; not secret, and chosen by the attacker in this report.- Password reset flow: the multi-step feature where a user proves control of their email and then sets a new password.
- Intercepting proxy: a tool placed between browser and server that lets you see and edit the messages passing between them.
- Intruder: the feature of such a proxy that repeats one request many times, swapping a chosen value on each attempt.
- Attack point: the marked spot in a request that Intruder replaces on each attempt.
- Payloads: the list of values Intruder puts into the attack point, one per request.
- Thread count: how many requests Intruder sends at the same time; higher means the list is worked through faster.
- CVSS: a standard scoring system for the severity of a security issue; this one scored 4.8.
- Bounty: the money a program pays a researcher for a valid report; here 300.00 USD.