Skip to content
Business logic Write-up Beginner

How I Bypassed Xiaomi’s Rate Limit with Just a Few Extra Slashe

The rate limiter on Xiaomi's OTP email endpoint could be bypassed by adding extra slashes to the URL path, which made each variant appear as a new endpoint. An attacker could then send unlimited OTP emails to any registered address, causing mail bombing.

Salman Follow

Published on infosecxsalman.medium.com

Back in 2024, while exploring Xiaomi’s Bug Bounty Program, I came across an interesting and surprisingly simple rate limit bypass on https://account.xiaomi.com that allowed me to mail bomb any existing Xiaomi account via their OTP email functionality.

Salman, on infosecxsalman.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 rate limiter keyed on the raw URL path rather than the normalised path, so path variants with extra slashes were treated as distinct endpoints.

Impact

An attacker could send unlimited OTP emails to any registered Xiaomi address, causing mail bombing; the text does not mention any defence that limited this.

What the attacker needed

Target email address is registered with Xiaomi; no authentication needed

The fix

The issue was fixed by Xiaomi within a week of the report.

How it was found

  1. Send OTP requests to the normal endpoint until the rate limiter returns a 403.
  2. Add extra slashes to the path before the endpoint name.
  3. Send more OTP requests using the modified URL to bypass the limit.
  4. If blocked again, add even more slashes to reset the counter.

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 rate limiter is a security control that stops someone from making too many requests in a short time, like a bouncer limiting how often you can enter a club. Here, the limiter counted requests per exact web address, so adding extra slashes to the address made it think each request was for a different place. That let an attacker keep sending verification emails to someone's inbox without being blocked.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.