Skip to content
Race condition Write-up Intermediate

OTPs Gone Wild: When “One-Time” Means… Multiple Times?

The application allowed multiple valid one-time passwords (OTPs) to exist simultaneously when OTP generation requests were sent in parallel. An attacker could use any of these codes, making brute-force or interception easier.

medium.com

Published on medium.com

This one? It was the whisper type.

ValidByAccident, on medium.com

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the backend does not invalidate previous OTPs when new ones are generated, and parallel requests create multiple valid codes.

Impact

Brute-force attacks become easier and OTP interception becomes more forgiving, giving attackers a bigger window of opportunity.

What the attacker needed

Access to the login flow; ability to intercept requests; tool to send parallel requests

The fix

The application should invalidate all previous OTPs when a new one is generated, ensuring only one valid code exists at a time.

How it was found

  1. Start logging in using the one-time code option.
  2. Wait a few seconds, hit resend code, and intercept that request.
  3. Send the same request multiple times in parallel using a tool like Burp Suite.
  4. Observe that multiple valid OTPs are generated and each is accepted by the verification endpoint.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A one-time password (OTP) is a code you use once to log in. Normally, when you request a new code, the old one stops working. Here, the system kept all codes valid at the same time, so more than one correct code existed. This makes it easier for an attacker to guess or intercept a code.

What is Race condition?

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

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.