Skip to content
Race condition Disclosed report Advanced

0 Click account takeover via timed requests to ███████forgot-password (single-packet attack)

The forgot-password endpoint was vulnerable to a race condition that allowed an attacker to obtain the password reset token for any account. By sending carefully timed requests using a single-packet attack, an attacker could take over any account knowing only the victim's email address.

0x999 Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 4 months
  • Disclosed after 10 months

Summary by the program

An account takeover vulnerability was present in the forgot password functionality of ██████████. By sending carefully timed requests using a single-packet attack to the ████forgot-password path, an attacker is able to obtain the password reset token for any account on the platform. This attack requires only knowledge of the victim's email address registered on █████████████████████████████████.

The original report as published on HackerOne, by 0x999. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target was the forgot-password functionality of a platform. The weakness was classified as use of a broken or risky cryptographic algorithm, and the report was rated high severity. The program's own summary states the outcome plainly: an account takeover was possible, and an attacker could obtain the password reset token for any account on the platform.

The only precondition the summary names is knowledge of the victim's email address as registered on the platform. No other information about the victim is required.

The mechanism was a single-packet attack against the forgot-password endpoint. The attacker sends carefully timed requests to the path ████forgot-password, and the timing is what makes the attack work. The report does not include the individual requests, headers or payloads used, so there is nothing further to reproduce here.

The report gives no bounty figure and no CVSS score. It does not describe the fix that was applied. The disclosure date is 11 July 2024.

Root cause

The classification names a broken or risky cryptographic algorithm. The report does not identify the exact weak point. The report does not describe the mechanism by which the timed requests yield the victim's token.

Impact

An attacker who knows a victim's registered email address can take over that account. The summary describes this as applying to any account on the platform. The attacker obtains the password reset token for the account.

How this kind of bug works

Password reset tokens are bearer secrets: whoever presents a valid token can set a new password for the account it belongs to. They must therefore be unpredictable and unique. Uniqueness is the property that timed attacks target. If a server generates tokens from a source that is not unique per request, such as a time value with coarse resolution, a counter shared across workers, or a pseudo-random generator seeded once per process, then requests that arrive in the same instant can receive the same value.

A single-packet attack exploits that. HTTP/1.1 requests are sent over separate connections, but the final bytes of each request are held back and then released together in one TCP packet, so the server receives and begins processing them at effectively the same moment. Against a token generator with weak per-request entropy, this collapses the window in which the values would otherwise differ. The same idea applies to HTTP/2, where many streams share one connection and can be made to arrive together.

Defences are straightforward in principle: generate tokens with a cryptographically secure random generator, with enough entropy that collisions are negligible, and bind each token to a single account and a single use. Tokens should expire quickly and be invalidated when a new one is issued or when the password changes.

How to test for it

  1. Identify the reset endpoint and confirm the normal flow: request a reset for your own account, capture the token, and note how it is delivered and consumed.
  2. Request several resets for the same account in quick succession and compare the tokens. Identical or sequential values are a strong signal.
  3. Request resets for two different accounts you control, timed to arrive together using a single-packet attack, and compare the two tokens. A match across accounts is the finding.
  4. Repeat the paired request several times to rule out coincidence, and record the timing method used.
  5. Confirm exploitability by using the token issued to your account to reset the other account's password, then restore both accounts.

A positive result is two tokens that are equal, or one token that is accepted for an account it was not issued to. Common false positives are tokens that merely look similar because they share a fixed prefix or encoding, tokens that are reused legitimately within a session, and matches caused by caching rather than by the generator. Always verify that the token actually resets the other account before reporting.

How it is fixed

Use a cryptographically secure random number generator for every token, with sufficient length that guessing is infeasible. Ensure the generator is not seeded per process or per time window, and that concurrent workers cannot produce the same value. Store tokens server-side, bound to one account, single use, with a short expiry, and invalidate outstanding tokens when a new reset is requested or the password changes. Rate limiting reset requests reduces the practicality of timing attacks but does not replace correct token generation.

Hunting notes

Reset and invitation flows are the usual home for this bug class, along with email verification links, API keys issued at signup, and any endpoint that mints a secret on demand. Recon signals include endpoints that return a token in a response body, tokens with visible structure such as timestamps or counters, and infrastructure where many requests are handled by forked workers. Test with paired requests rather than single ones, and keep the timing method consistent so results are reproducible. To make a report land, show the two tokens side by side, show the second account's password actually changed, and state the precondition (knowledge of the victim's email address) honestly. Programs accept these reports when the cross-account reset is demonstrated, not when only a similarity between tokens is shown.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What happened, in plain words

This report is about a website feature almost everyone has used: the "forgot password" link. The report was rated high severity. The program's own summary is blunt about the result: an attacker could take over any account on the platform, and the only thing they needed to know was the victim's email address as registered there.

To understand why that is serious, start with what the feature does. When you forget your password, you type your email address into a form and the site emails you a link. That link contains a long, random-looking string called a reset token. Whoever presents a valid token is allowed to set a new password for the account it belongs to. The token is therefore a bearer secret: like a cloakroom ticket, it does not matter who is holding it, only that the ticket is genuine. If someone else can get hold of your token, they can set a new password on your account and lock you out.

Normally that is hard, because the token is long and random and only ever sent to your inbox. This report shows a way around that. The attacker sends carefully timed requests to the reset page, using a technique called a single-packet attack. The timing is the whole trick. The report does not include the individual requests, headers or payloads that were used, so there is nothing to reproduce here beyond the path itself:

Text
████forgot-password

That is the endpoint the timed requests were aimed at. The report does not give the full URL, the request method, or the body sent.

Root cause

The report classifies the weakness as use of a broken or risky cryptographic algorithm. The report does not describe the mechanism by which the timed requests yield the victim's token.

Impact

An attacker who knows a victim's registered email address can take over that account. The summary describes this as applying to any account on the platform. The attacker obtains the password reset token for the account.

In general, how this kind of bug works

Password reset tokens are bearer secrets: whoever presents a valid token can set a new password for the account it belongs to. They must therefore be unpredictable and unique. Uniqueness is the property that timed attacks target. If a server generates tokens from a source that is not unique per request, such as a time value with coarse resolution, a counter shared across workers, or a pseudo-random generator seeded once per process, then requests that arrive in the same instant can receive the same value.

A single-packet attack exploits that. HTTP/1.1 requests are sent over separate connections, but the final bytes of each request are held back and then released together in one TCP packet, so the server receives and begins processing them at effectively the same moment. Against a token generator with weak per-request entropy, this collapses the window in which the values would otherwise differ. The same idea applies to HTTP/2, where many streams share one connection and can be made to arrive together.

Defences are straightforward in principle: generate tokens with a cryptographically secure random generator, with enough entropy that collisions are negligible, and bind each token to a single account and a single use. Tokens should expire quickly and be invalidated when a new one is issued or when the password changes.

In general, how to test for it

  1. Identify the reset endpoint and confirm the normal flow: request a reset for your own account, capture the token, and note how it is delivered and consumed.
  2. Request several resets for the same account in quick succession and compare the tokens. Identical or sequential values are a strong signal.
  3. Request resets for two different accounts you control, timed to arrive together using a single-packet attack, and compare the two tokens. A match across accounts is the finding.
  4. Repeat the paired request several times to rule out coincidence, and record the timing method used.
  5. Confirm exploitability by using the token issued to your account to reset the other account's password, then restore both accounts.

A positive result is two tokens that are equal, or one token that is accepted for an account it was not issued to. Common false positives are tokens that merely look similar because they share a fixed prefix or encoding, tokens that are reused legitimately within a session, and matches caused by caching rather than by the generator. Always verify that the token actually resets the other account before reporting.

In general, how it is fixed

Use a cryptographically secure random number generator for every token, with sufficient length that guessing is infeasible. Ensure the generator is not seeded per process or per time window, and that concurrent workers cannot produce the same value. Store tokens server-side, bound to one account, single use, with a short expiry, and invalidate outstanding tokens when a new reset is requested or the password changes. Rate limiting reset requests reduces the practicality of timing attacks but does not replace correct token generation.

In general, where to look

Reset and invitation flows are the usual home for this bug class, along with email verification links, API keys issued at signup, and any endpoint that mints a secret on demand. Recon signals include endpoints that return a token in a response body, tokens with visible structure such as timestamps or counters, and infrastructure where many requests are handled by forked workers. Test with paired requests rather than single ones, and keep the timing method consistent so results are reproducible. To make a report land, show the two tokens side by side, show the second account's password actually changed, and state the precondition (knowledge of the victim's email address) honestly. Programs accept these reports when the cross-account reset is demonstrated, not when only a similarity between tokens is shown.

Glossary

  • Account takeover: gaining control of someone else's account, usually by changing its password or login details.
  • Bearer secret: a value that grants access to whoever presents it, regardless of who they are.
  • Broken or risky cryptographic algorithm: a weakness category for code that uses randomness or encryption in a way that makes secrets predictable.
  • Concurrent requests: requests that a server handles at the same time rather than one after another.
  • Cookie: a small piece of data a site stores in your browser to remember who you are between requests.
  • Cross-account reset: using a token issued for one account to reset the password of a different account.
  • Cryptographically secure random number generator: a random source designed so its output cannot be predicted, even by someone who has seen earlier values.
  • CVSS: a standard scoring system for rating the severity of a vulnerability.
  • Endpoint: a specific address or path on a server that accepts requests, such as the forgot-password page.
  • Entropy: the amount of unpredictability in a value; more entropy means harder to guess.
  • False positive: a test result that looks like a bug but is not one.
  • Forked worker: a separate copy of a server process that handles some of the incoming requests.
  • HTTP/1.1: the older version of the protocol browsers and servers use to exchange web pages and data.
  • HTTP/2: a newer version of that protocol that lets many requests share one connection.
  • Password reset token: a long random string sent in a reset link that proves the holder is allowed to set a new password.
  • Precondition: something an attacker must already know or have before the attack can work.
  • Pseudo-random generator: software that produces numbers that look random but are generated by a fixed procedure and can be predictable.
  • Rate limiting: restricting how many requests a client may make in a given time.
  • Request: a message a browser or tool sends to a server asking for something.
  • Seeded: given a starting value that determines all the "random" numbers that follow.
  • Single-packet attack: a technique that sends the final parts of several requests together in one network packet so the server processes them at the same moment.
  • TCP packet: a small unit of data sent across a network connection.
  • Token: a value used to prove identity or permission, often short-lived.
  • Vulnerability class: a family of bugs that share the same underlying mistake.

More by 0x999

View all

1 more disclosed report, best first.

More from Mars

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.