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.
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.
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
- Log in to three devices normally.
- Prepare login requests for a fourth and fifth device using the same account credentials.
- Intercept the login request that adds a new device.
- Send the request to Repeater and drop it.
- Repeat for the fifth device login.
- 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.