On this page
OTP bombing is the abuse of a "send code" endpoint to flood one phone with verification texts or calls. It harasses the victim and costs you money. The fix is a set of limits keyed on the destination number, the client and the number prefix, backed by a pre-send check, cost caps and monitoring.
What is OTP bombing?
Any endpoint that sends a one-time passcode to a number the caller types in can be turned against the owner of that number. An attacker, or a script, submits the victim's number again and again: sign-up, login, password reset, "resend code". The victim receives dozens or hundreds of messages or calls.
Why people do it:
- Harassment. The flood itself is the goal.
- Cover. A genuine alert, such as a bank's warning about a login, gets lost among the noise.
- Fatigue. Users flooded with prompts may approve or share a code just to make it stop.
- Testing. Attackers probe which services have weak limits before using them for pumping.
You pay for every message. The victim pays in attention and trust in your brand, which is the name on the texts.
How do CWE and OWASP classify it?
Mapping the issue to shared vocabularies helps when you write tickets, threat models or audit answers:
| Reference | Name | How it applies |
|---|---|---|
| CWE-799 | Improper Control of Interaction Frequency | The product "does not properly limit the number or frequency of interactions that it has with an actor" (MITRE) |
| CWE-770 | Allocation of Resources Without Limits or Throttling | Each send consumes a paid resource with no ceiling (MITRE) |
| OWASP API4:2023 | Unrestricted Resource Consumption | Names SMS among the paid integrations to limit. Its example is an SMS "forgot password" flow triggered tens of thousands of times (OWASP, 2023) |
| OWASP API6:2023 | Unrestricted Access to Sensitive Business Flows | Sending codes is a legitimate flow that harms the business when automated (OWASP, 2023) |
NIST's guidance adds a related rule for the other half of the flow: verifiers must limit consecutive failed authentication attempts, and "generating a new authentication secret SHALL NOT reset the failed authentication count" (NIST, 2025). Resending a code must not become a way around your guess limits either.
Which keys should you rate-limit on?
One key is never enough. Attackers rotate whatever you limit on. Stack several, and make the destination number the strictest.
| Key | Suggested starting limit | Catches |
|---|---|---|
| Destination number | 3 codes per 15 minutes, 10 per day | Bombing one victim, whatever the source |
| Destination number + channel | 1 voice call per 10 minutes | Expensive call floods |
| Client IP | 10 sends per hour | Simple scripts |
| Device or browser fingerprint | 5 sends per hour | Scripts rotating IPs |
| Session or account | 3 resends per session | Resend-button abuse |
| Number prefix (first digits of the national number) | Set from normal traffic, per hour | Bots walking through a range |
| Destination country | Ceiling per hour, from normal traffic | Sudden country spikes |
| Global | Daily spend cap with an alert well below it | Everything else |
The numbers are starting points, not standards. Set them from your own traffic: look at the 99th percentile of legitimate sends per number and per IP, then add headroom.
Implementation notes:
- Use sliding windows or token buckets, not fixed windows that reset on the hour and invite bursts at :59 and :00.
- Count attempts, not successes. A send that failed still consumed your limit.
- Respond the same way whether the limit was hit or the code was sent ("If this number can receive codes, one is on its way"), so the endpoint doesn't reveal which numbers have accounts.
- Increase the resend delay after each resend: 30 seconds, then 60, then several minutes.
What else belongs in front of the send?
Rate limits bound the damage. These controls make each attempt harder or pointless:
- Bot protection (a challenge or proof-of-work) before the first send in a session.
- A real session that loaded the page and interacted with it before the request.
- Normalization to E.164 and rejection of impossible numbers.
- A country allow-list for codes, limited to the countries you serve.
- A line-type check, so you never send codes to premium-rate, shared-cost or fixed lines.
- Idempotency per session, so a double-click or retry doesn't send twice.
- A kill switch per country and per flow that on-call staff can use.
How should the send-code flow look to a real user?
Good limits are invisible to honest users and obvious to scripts. The interface is part of the defence:
- One clear request. The user enters a number and taps "Send code" once. Disable the button while the request is in flight.
- A visible countdown. "You can request a new code in 30 s" sets expectations and stops frustrated double-taps, which are a common source of duplicate sends.
- Growing delays. Each resend waits longer than the last. After a few, offer another method instead of another text.
- Alternatives before more texts. A code by e-mail, a passkey, an authenticator app or a messaging app the user chose. Each one takes pressure off SMS.
- Neutral wording. "If this number can receive codes, we've sent one" works for sign-up, login and reset without revealing whether the number has an account.
- A way out for victims. Include a short line in the message, such as "Didn't request this? Ignore it", and a support route to stop further codes to the number.
Messages themselves should carry your brand name and no links that log the user in. A code message that contains only the code and your name is harder to reuse for phishing.
Test the flow on a slow mobile connection. Many duplicate sends come from impatient users on a weak signal, not from attackers, and the countdown fixes both.
How does a pre-send check fit?
The check runs after the rate limiter and before the send. That order matters: a bot must not be able to make you pay for checks either. A real test-mode request with MobileValidate's carrier lookup:
curl https://api.mobilevalidate.com/v1/lookup \
-H "Authorization: Bearer $MOBILEVALIDATE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: otp-send-8c21" \
-d '{"numbers": ["+447700900001"], "checks": ["carrier"], "max_age": 86400,
"max_cost": {"amount": "0.01", "currency": "USD"}, "wait": 3}'The answer (test mode) says the number is valid, line_type: "mobile", carrier Test Carrier, country GB, and billed: false. Three details help against bombing specifically:
max_age: 86400accepts a cached answer up to a day old. A bot hammering "resend" on one number gets the cached answer, and cache hits are free.max_costrefuses the request if its maximum possible cost is higher than your ceiling. The0.01above is an example ceiling, not our price. Current rates are on the pricing page.Idempotency-Keyreplays the first answer for a retried request instead of checking again.
Our own API applies the same ideas you should: 10 requests per second per key with bursts of 20, daily caps per account, and 403 suspected_enumeration for 20 or more consecutive numbers in one request. The details are on the rate limits and abuse page.
How should you handle rate-limit responses?
Whatever sits behind your endpoint, including our API, will sometimes say "slow down". Handle it deliberately:
// Wrap your send-code call. Never retry a user-facing OTP send in a tight loop.
async function sendWithBackoff(send, maxAttempts = 3) {
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
const res = await send();
if (res.status !== 429) return res;
const wait = Number(res.headers.get("retry-after") ?? 1) * 1000;
await new Promise((r) => setTimeout(r, wait * attempt));
}
return { status: 429, deferred: true }; // tell the user to try again shortly
}The test number +447700900429 returns a real 429 rate_limited with a Retry-After header in test mode, so you can test this path. See the test mode page for the full list.
What should you monitor?
Bombing is visible early if you look at the right shapes:
- Sends per destination number per hour. Alert on any number above your limit's warning level.
- Top destination numbers of the day. A victim appears at the top of the list.
- Verification rate per flow. Codes entered ÷ codes sent. Bombing and pumping both drive it down.
- Rate-limit hits by key. A jump in device-level hits with steady IP-level hits means rotation.
- Complaints. "I keep getting codes I didn't ask for" in support tickets is a direct signal. Give support a way to block sends to that number.
When you find a victim, stop sends to their number, keep the logs, and consider telling them what happened. It is your brand on the messages.
What are the key takeaways?
- OTP bombing floods one phone with codes from your send-code endpoint. It maps to CWE-799, CWE-770 and OWASP API4 and API6 (2023).
- Rate-limit on the destination number first, then IP, device, session, prefix, country and a global spend cap.
- Answer the same way whether a limit was hit or a code was sent, and never let resends reset failed-attempt counts.
- Put a pre-send check after the rate limiter. Cached answers are free,
max_costcaps spend, and idempotency stops duplicate sends. - Watch sends per number and verification rates, and give support a way to protect a victim quickly.
For the cost-fraud side of the same endpoint, read SMS pumping: how it works and how to stop it. For voice codes, see toll fraud in voice OTP.
Sources
- CWE-799: Improper Control of Interaction Frequency — MITRE
- CWE-770: Allocation of Resources Without Limits or Throttling — MITRE
- OWASP API Security Top 10 (2023): API4 Unrestricted Resource Consumption — OWASP, 2023
- OWASP API Security Top 10 (2023): API6 Unrestricted Access to Sensitive Business Flows — OWASP, 2023
- NIST SP 800-63B-4: Digital Identity Guidelines — Authentication and Authenticator Management — NIST, 2025
Frequently asked questions
What is OTP bombing?
Also called SMS bombing, it is the abuse of a send-code endpoint to flood one person's phone with verification messages or calls. It harasses the victim, can hide a real security alert among the noise, and runs up your messaging bill.
Which CWE entries describe OTP bombing?
The closest are CWE-799, Improper Control of Interaction Frequency, and CWE-770, Allocation of Resources Without Limits or Throttling. In the OWASP API Security Top 10 (2023), it falls under API4 Unrestricted Resource Consumption and API6 Unrestricted Access to Sensitive Business Flows.
Is a per-IP rate limit enough?
No. Attackers rotate IP addresses cheaply. Limit per destination number first, then per IP, device, session, account and number prefix, and keep a global ceiling.
How is OTP bombing different from SMS pumping?
The mechanics are the same, a bot abusing the send-code endpoint, but the target differs. Bombing aims at one victim's phone. Pumping aims at many numbers that pay the attacker. The same controls help against both.
Related services and guides
More from the blog
All articlesFraud prevention
SMS pumping: how it works and how to stop it
How SMS pumping (artificially inflated traffic) drains OTP budgets, the signals that give it away, and a layered checklist to stop it before you pay.
8 min read
Fraud prevention
OTP fraud prevention: the checks to run before you send a code
Before sending an OTP, look up the number: number type, line type and carrier, HLR status, porting. Which APIs offer it, what to compare, a pre-send flow.
10 min read
Fraud prevention
Toll fraud in voice OTP: why providers block codes as suspected toll fraud
Why identity and messaging providers block voice and SMS codes as suspected toll fraud, what triggers it, and a pre-call check recipe for developers.
7 min read

