Skip to content
Race condition Write-up Intermediate

Business Logic: How I Bypassed Device Login Limits on a Streaming

The streaming service enforced a four-device login limit by checking the device count when a new device was added, but the check was not atomic. An attacker could send two login requests in parallel so both passed the limit check, allowing more than four devices to be logged in simultaneously.

Rajveer Follow

Published on medium.com

I started to analyze the target and began collecting subdomains, as it was a wildcard scope. I manually started hunting for authentication-related bugs, but no luck, as it was using JWT.

Rajveer, 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 device limit check and the device addition were not performed atomically, so concurrent requests could both pass the check before either updated the count.

Impact

An attacker could bypass the four-device limit and keep more than four devices logged in at once, which could allow account sharing beyond the intended restriction.

What the attacker needed

Valid account credentials; ability to intercept and replay requests; two devices or browsers

How it was found

  1. Log in to three devices normally.
  2. Prepare login requests for a fourth and fifth device using the same account credentials.
  3. Intercept the login request that adds a new device.
  4. Send the request to Repeater and drop it.
  5. Repeat for the fifth device login.
  6. Create a group and send both requests in parallel.

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 website may limit how many devices can use one account at the same time. The site checks the current number of devices and then adds the new one, but if two requests arrive at almost the same moment, both can see the old count and both get approved. This is called a race condition, and it lets someone exceed the limit.

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.

More by Rajveer

View all

1 more disclosed report, best first.

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.