Skip to content
Account takeover Write-up Intermediate

Exploiting OTP with IP Rotation on a Flutter App: Bypassing Rate

The password reset flow used a 4-digit OTP and blocked an IP after 30 failed attempts, but the block lasted only one minute. An attacker could rotate through many proxies to brute-force the OTP within its 10-minute validity and obtain a UUID to reset any user's password.

Hussein A.Taha Follow

Published on 0xhussein.medium.com

My name is Hussein Ali Taha, a cybersecurity researcher specializing in mobile and web application security. This report details a vulnerability I discovered in a Flutter application.

Hussein A.Taha, on 0xhussein.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 OTP was too short (4 digits) and the rate limit was per-IP with a short block duration, allowing bypass via IP rotation.

Impact

An attacker could brute-force the OTP and obtain a UUID to reset the password of any user registered in the application within minutes.

What the attacker needed

Victim's phone number; access to many proxies; ability to intercept app traffic

How it was found

  1. Use the Forgot Password feature and enter the victim's phone number to trigger an OTP.
  2. Capture the OTP verification request and send it to Intruder.
  3. Configure Intruder to try all 4-digit codes from 0000 to 9999.
  4. Observe that the server blocks the IP after 30 attempts for one minute.
  5. Collect and filter a list of fast proxies.
  6. Run a script that rotates proxies, sending up to 30 attempts per IP, and stops on a 200 response.

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 short code sent to your phone to prove it's you. Here the code was only 4 digits, so there are just 10,000 possible codes. The app tried to stop guessing by blocking an IP address after 30 wrong tries, but the block lasted only a minute, so an attacker could switch to a different IP address and keep guessing until they found the right code.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.