The 3 Day Account Takeover
The password reset link used a short, predictable token that could be brute-forced because there was no rate limiting. An attacker could guess the token for any account and reset its password, leading to account takeover.
Publishing this write-up after a long time. Today, I’m gonna tell you how I was able to takeover any account.
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 bug bounty program, so the author refers to it throughout as redacted.com. Only the main domain was in scope, which made the search space narrow. The application allowed users to register themselves, and the feature at the centre of the write-up is the Reset Password flow: a user who has forgotten their password requests a reset link, receives it, and uses it to set a new password.
The reset link carried two parameters, id and token:
https://redacted.com/password-reset?id=14129302&[redacted]
id was numeric and eight characters long. token was alphanumeric and six characters long. The whole attack rests on how those two values are generated and checked.
Setup
The author began with initial recon, looking for hidden directories and other interesting content, and found nothing after about an hour. The only opening was self-registration, so an account was created to get a proper view of the target.
To study the reset tokens, three accounts were eventually used. For each of them a password reset link was requested, the password was changed through the link, and the process was repeated three times. That produced 12 password reset links, four per account, and the values of id and token from all of them were written down for comparison. The brute-force step was run in Burp Suite's Intruder.
Finding it
With the twelve links collected, the id parameter was the easy part: it stayed the same for each account across all of that account's resets. Searching the account itself turned up the same value in the source code of the profile page, so id is simply a stable, enumerable user identifier.
The token was harder. About three hours went into working out how its value was produced, and the conclusion was that it was completely random. At that point brute force looked hopeless: a six-character alphanumeric token drawn from 26 lowercase letters and the digits 0 to 9 gives 36 possible characters per position, and 36⁶ = 2176782336 combinations. That is far too many to enumerate, so the author dropped the idea and went back to hunting elsewhere.
After three days of continuous hunting without a single vulnerability, the notes were reviewed again and the token values now looked fishy. Looking closely, the tokens were not drawn from the full 36-character set at all. They consisted only of specific lowercase letters and digits: a, b, c, d, e, 1, 5, 8 and 0. The author does not explain why the generator behaved this way, only that it did. With a nine-character alphabet, the search space collapses to 9⁶ = 531441 combinations, which is entirely practical.
Exploitation
Step 1: Request a reset link and read the parameters
Log out, request a password reset for the account, and inspect the link that arrives. The two parameters and their formats are the whole surface:
https://redacted.com/password-reset?id=14129302&[redacted]
id identifies the victim account and is visible in the profile page source, so it is not a secret. token is the only value that has to be guessed.
Step 2: Establish that the token is random but constrained
Collect several links per account and compare. The id never changes for a given account, while the token values appeared completely random. The initial assumption was a full alphanumeric space of 36⁶ combinations; the later observation was that every token seen used only the nine characters listed above, reducing the space to 9⁶ = 531441.
Step 3: Brute-force the token with Burp Intruder
Send the reset request to Burp Suite's Intruder, place the payload position on the token parameter, and run the attack over the reduced alphabet. The report notes that there was no rate limiting on the endpoint, so the requests could be sent at speed. After about an hour of brute-forcing, the correct token value was found.
Step 4: Reset the victim's password
With a valid id and the recovered token, the reset link is complete and the password can be changed, which takes over the account. The author recorded a proof-of-concept video and sent it to the team, and the report was triaged.
Root cause
The design flaw is that the reset token is short and drawn from a tiny alphabet, so its entropy is far below what a security token needs. Nine possible characters over six positions is 531441 values, and the author found the correct token after about an hour of brute-forcing. The id parameter stayed the same for each account and appeared in the source code of the author's own profile page, so the attacker only has to guess the token.
The second failure is the absence of rate limiting on the reset endpoint, which allowed the whole space to be walked without interference. The report does not describe any other defence, such as lockout or single-use invalidation.
Impact
An attacker who can reach the reset endpoint and knows or guesses a victim's id can take over that account, because the token space is small enough to enumerate. The author states this as the ability to take over any account. The practical conditions are that the endpoint had no rate limiting and that the token alphabet stays as narrow as observed.
Fix
The report does not say what the team changed. The measures that address the root cause are to generate reset tokens from a cryptographically secure random source over the full alphanumeric range or longer, and to rate-limit and lock out repeated failed reset attempts so that enumeration of even a small space is not viable.
Variants to test
- Short reset tokens with a reduced alphabet. Request several resets for your own account and compare the character set actually used. A positive result is a token whose observed alphabet is much smaller than the advertised one, as with the nine characters here.
- Stable, enumerable identifiers in reset links. Check whether the
idor equivalent parameter is the same across resets and appears in page source or API responses. A positive result is an identifier you can read for any user without guessing. - Missing rate limiting on reset endpoints. Send a burst of reset requests with varying tokens and watch for throttling, lockout or CAPTCHA. A positive result is a long run of responses with no restriction.
- Token reuse and expiry. Request a reset, use it, then try it again, and try an old token after a new one is issued. A positive result is a token that still works after it should have been invalidated.


What happened, in plain words
A security researcher found a way to take over any user account on a website. The site was part of a private bug bounty program, so the researcher calls it redacted.com throughout. A bug bounty program is an arrangement where a company invites independent researchers to look for security problems in its systems and report them, often for a reward. "Private" means only invited researchers can take part, and the details are not meant to be shared publicly in full.
Only the main domain of the site was in scope, meaning only that one address was authorised to be tested. That made the search space narrow: there was less surface to poke at, so finding something interesting was harder.
The website let people create their own accounts. That was the only opening the researcher could find, so an account was made to get a proper view of how the site behaved from the inside. The feature at the centre of the story is the Reset Password flow. When you forget your password, most sites let you ask for a reset link by email. You click the link, land on a page, and type a new password. That link usually contains a secret code so the site can be sure the person clicking it is really you and not someone else.
On redacted.com, that reset link carried two values in its address: id and token. The id was a number, eight digits long. The token was a mix of letters and digits, six characters long. The whole attack rests on how those two values are generated and checked. The researcher worked out that the id is not secret at all, and that the token, although it looked random, was drawn from a much smaller set of characters than it appeared. That made it guessable, and guessing it let the researcher reset anyone's password.
The reset link and its two parameters
Here is the kind of link the site sent out:
https://redacted.com/password-reset?id=14129302&[redacted]
Line by line, in plain words:
https://is the secure version of the protocol your browser uses to talk to websites. Thesstands for secure: the traffic is encrypted so nobody in between can read it.redacted.comis the site's address. The real name is hidden because the program was private./password-resetis the path, the part of the site that handles password resets. Think of it as the specific desk in a building where you go to change your password.?marks the start of the query string, the extra information passed along with the address. Everything after the?is data, not part of the page location.id=14129302is the first parameter.idis the name,14129302is the value. This tells the site which account the reset is for.&separates one parameter from the next.[redacted] is the second parameter.tokenis the name,8a5edb` is the value. This is the secret code that proves the person clicking the link is allowed to reset that account.
A parameter is just a named piece of information attached to a web address. A useful everyday comparison: a parcel has a label with fields like "recipient" and "address". The query string is the label, and each parameter is one field on it.
A token here is a short secret code. Sites use tokens so that the site can check the request is legitimate. If you can guess someone else's token, you can pretend to be them.
Setting up: recon and an account
The researcher began with initial recon, short for reconnaissance. In security, recon means gathering information about a target before attacking it: what pages exist, what software it runs, what features it offers. A common first step is looking for hidden directories, folders on the server that are not linked from the main site but might contain something interesting. After about an hour of this, nothing turned up.
The only opening was self-registration, so an account was created. Having your own account matters because it lets you see the site the way a normal logged-in user does: the profile page, the settings, the password reset flow, and so on. You cannot study a feature properly from the outside.
To study the reset tokens, three accounts were eventually used. For each one, a password reset link was requested, the password was changed through the link, and the process was repeated three times. That produced 12 password reset links, four per account. The values of id and token from all of them were written down for comparison. Writing values down is a simple but powerful habit: patterns that are invisible in one link become obvious across a dozen.
The brute-force step was run in Burp Suite's Intruder. Burp Suite is a tool that sits between your browser and a website so you can see and change the requests your browser sends. Intruder is the part of it that sends the same request many times with one value changed each time. Think of it as a machine that fills in a form automatically, trying a different answer on every attempt.
Finding it: the id is easy, the token is not
With the twelve links collected, the id parameter was the easy part. It stayed the same for each account across all of that account's resets. Searching the account itself turned up the same value in the source code of the profile page. Source code here means the raw HTML that your browser receives and turns into the page you see. You can view it in any browser with "View Page Source". So id is a stable user identifier: a number that identifies a user and does not change. The author found it in the source code of their own profile page.
The token was harder. About three hours went into working out how its value was produced, and the conclusion was that it was completely random. At that point brute force looked hopeless. A six-character alphanumeric token drawn from 26 lowercase letters and the digits 0 to 9 gives 36 possible characters per position. The number of possible tokens is 36 multiplied by itself six times, written 36⁶, which equals 2176782336 combinations. That is far too many to enumerate: even at high speed, trying billions of values would take far too long. So the researcher dropped the idea and went back to hunting elsewhere.
Brute force means trying every possible value until one works. It is like trying every key on a keyring until one opens the door. It only works when the number of possible keys is small enough to try in a reasonable time.
After three days of continuous hunting without a single vulnerability, the notes were reviewed again and the token values now looked fishy. Looking closely, the tokens were not drawn from the full 36-character set at all. They consisted only of specific lowercase letters and digits: a, b, c, d, e, 1, 5, 8 and 0. The author does not explain why the generator behaved this way, only that it did. With a nine-character alphabet, the search space collapses to 9⁶ = 531441 combinations, which is entirely practical.
This is the key insight of the whole story. The token looked random, but it was random over a much smaller set than advertised. A useful comparison: a six-digit padlock code sounds strong if you assume digits 0 to 9, giving a million combinations. But if the lock only ever uses nine of those digits, the real number of combinations is far smaller, and the lock is much weaker than it looks.
Exploitation
Step 1: Request a reset link and read the parameters
Log out, request a password reset for the account, and inspect the link that arrives. The two parameters and their formats are the whole surface:
https://redacted.com/password-reset?id=14129302&[redacted]
- The address is the reset page on redacted.com.
id=14129302identifies the victim account. It is visible in the profile page source, so it is not a secret.- `[redacted] is the only value that has to be guessed.
Why this step matters: before you can attack anything, you need to know exactly what the request looks like. Reading the link tells you which values the site trusts and which of them you might be able to control or guess.
Step 2: Establish that the token is random but constrained
Collect several links per account and compare. The id never changes for a given account, while the token values appeared completely random. The initial assumption was a full alphanumeric space of 36⁶ combinations. The later observation was that every token seen used only the nine characters listed above, reducing the space to 9⁶ = 531441.
Why this step matters: you cannot know how hard a token is to guess until you have seen several of them. One token tells you nothing. A dozen tokens, written down and compared, reveal the alphabet the generator actually uses.
Step 3: Brute-force the token with Burp Intruder
Send the reset request to Burp Suite's Intruder, place the payload position on the token parameter, and run the attack over the reduced alphabet. The report notes that there was no rate limiting on the endpoint, so the requests could be sent at speed. After about an hour of brute-forcing, the correct token value was found.
Rate limiting is a defence where a server refuses to answer too many requests from the same source in a short time. It is like a bouncer who stops you after three wrong attempts at a door. Without it, a machine can try hundreds or thousands of values per second.
Why this step matters: the reduced alphabet made the search small enough to run, and the missing rate limit made it fast enough to finish in about an hour.
Step 4: Reset the victim's password
With a valid id and the recovered token, the reset link is complete and the password can be changed, which takes over the account. The author recorded a proof-of-concept video and sent it to the team, and the report was triaged. A proof-of-concept video is a short recording that shows the attack working from start to finish, so the team can see it is real. Triaged means the team reviewed the report, confirmed it was valid, and moved it into their workflow for fixing.
Why this step matters: finding a token is only half the job. You have to show that the token actually lets you change someone else's password, because that is the impact the team cares about.
Root cause
The design flaw is that the reset token is short and drawn from a tiny alphabet, so its entropy is far below what a security token needs. Entropy here means the amount of unpredictability in a value: how many equally likely possibilities there are. Nine possible characters over six positions is 531441 values, and the author found the correct token after about an hour of brute-forcing.
The id parameter being a stable, enumerable numeric identifier that appears in the profile page source means the attacker only has to guess the token, not identify the account. In other words, the site handed out half of the puzzle for free.
The second failure is the absence of rate limiting on the reset endpoint, which allowed the whole space to be walked without interference. The report does not describe any other defence, such as lockout or single-use invalidation.
Impact
An attacker who can reach the reset endpoint and knows or guesses a victim's id can take over that account, because the token space is small enough to enumerate. The author states this as the ability to take over any account. The practical conditions are that the endpoint had no rate limiting and that the token alphabet stays as narrow as observed. The report does not describe any restriction that would prevent this.
Fix
The measures that address the root cause are to generate reset tokens from a cryptographically secure random source over the full alphanumeric range or longer, and to rate-limit and lock out repeated failed reset attempts so that enumeration of even a small space is not viable. A cryptographically secure random source is a way of generating random values that cannot be predicted, even by someone who has seen many previous values. Ordinary random functions in programming languages are often predictable, which is why security tokens need a special one.
Variants to test
If you want to look for similar problems on sites you are authorised to test, here are four things to try. Each one is a small experiment you can run on your own account.
- Short reset tokens with a reduced alphabet. Request several resets for your own account and compare the character set actually used. A positive result is a token whose observed alphabet is much smaller than the advertised one, as with the nine characters here.
- Stable, enumerable identifiers in reset links. Check whether the
idor equivalent parameter is the same across resets and appears in page source or API responses. A positive result is an identifier you can read for any user without guessing. An API is a way for software to talk to other software, usually returning data in a structured format rather than a web page. - Missing rate limiting on reset endpoints. Send a burst of reset requests with varying tokens and watch for throttling, lockout or CAPTCHA. A positive result is a long run of responses with no restriction. A CAPTCHA is the little puzzle that asks you to prove you are human.
- Token reuse and expiry. Request a reset, use it, then try it again, and try an old token after a new one is issued. A positive result is a token that still works after it should have been invalidated.


Glossary
- Bug bounty program: an arrangement where a company invites independent researchers to find and report security problems, often for a reward.
- Private program: a bug bounty program open only to invited researchers, with details not meant to be shared in full.
- In scope: the parts of a system a researcher is authorised to test.
- Recon: short for reconnaissance; gathering information about a target before attacking it.
- Hidden directories: folders on a server that are not linked from the main site but might contain something interesting.
- Reset Password flow: the feature that lets a user who has forgotten their password request a link by email and set a new password.
- Parameter: a named piece of information attached to a web address, such as
idortoken. - Query string: the part of a web address after the
?, carrying parameters. - Token: a short secret code used to prove a request is legitimate, such as the code in a password reset link.
- Source code: the raw HTML a browser receives and turns into the page you see; viewable with "View Page Source".
- Brute force: trying every possible value until one works.
- Search space: the total number of possible values an attacker would have to try.
- Entropy: the amount of unpredictability in a value; how many equally likely possibilities there are.
- Rate limiting: a defence where a server refuses to answer too many requests from the same source in a short time.
- Burp Suite: a tool that sits between your browser and a website so you can see and change the requests your browser sends.
- Intruder: the part of Burp Suite that sends the same request many times with one value changed each time.
- Proof-of-concept video: a short recording that shows an attack working from start to finish.
- Triaged: reviewed by the team, confirmed valid, and moved into their workflow for fixing.
- API: a way for software to talk to other software, usually returning data in a structured format rather than a web page.
- CAPTCHA: a small puzzle that asks you to prove you are human.
- Cryptographically secure random source: a way of generating random values that cannot be predicted, even by someone who has seen many previous values.