How I Bypassed BookMyShow’s OTP Limit with Just a Space & Got ₹1000 for It!
The OTP rate limit on BookMyShow was keyed on the raw phone number string, so appending a whitespace character made each request look like a new number and reset the three-attempt limit. An attacker could therefore send unlimited OTP SMS to a victim, flooding their inbox and draining the company's SMS quota.
infosecwriteups.com
Published on infosecwriteups.com
Finding security loopholes in popular applications can sometimes be an exciting and rewarding experience. A couple of years ago, I found a simple vulnerability in BookMyShow’s OTP rate-limiting mechanism.
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 limit was applied to the unnormalised phone string, so trivial variations such as trailing whitespace were treated as distinct numbers.
Impact
An attacker could flood a user's SMS inbox with OTP messages and exhaust the company's paid SMS quota, and the author suggests it could also enable automated brute-force attacks or disrupt access.
What the attacker needed
Knowledge of victim's phone number; ability to send API requests
The fix
The rate limit should be enforced on a normalised phone number so that whitespace and other variations cannot create new counters.
How it was found
- Send an OTP request with the victim's mobile number in the phone parameter.
- Observe that the server blocks further requests after three attempts for that number.
- Append a whitespace character to the number and send again; the request is treated as new.
- Repeat with additional whitespace to keep bypassing the limit indefinitely.
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 the short code sent by SMS to log you in. The site tried to stop abuse by allowing only three code requests per phone number. The check compared the exact text of the number, so adding a space at the end made the server think it was a different number and start counting from zero again.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.