SMS Pumping: Protect Your OTP Endpoint and Your Bill

SMS pumping turns your public 'send code' button into someone else's income. How to spot it, and the controls to add to your OTP flow this week.

SMS Pumping: Protect Your OTP Endpoint and Your Bill

Every public "send code" button on your signup, login or password-reset page lets a stranger make you pay for a text message. SMS pumping is the fraud that turns that button into someone else's income, and security firms and messaging vendors are still publishing fresh guidance on it, because it keeps working. In this article I explain how to recognise it and which controls you can add to your OTP flow this week.

What SMS pumping is (and what it isn't)

SMS pumping, SMS toll fraud and artificially inflated traffic (AIT) are different names for the same thing. An attacker abuses your OTP or verification flow so that your system sends large numbers of messages to numbers they control. You pay for every message. They earn through a revenue-share arrangement with a rogue carrier on certain number ranges.

The traffic is usually generated by bots, or by cheap human labour, triggering fake signups, OTP requests and password resets. Very often they skip your web form entirely and call your API directly. That is why a CAPTCHA on the website alone is not enough if your mobile-app API is left open.

The best-known example came in late 2022, when Elon Musk said Twitter was losing about $60 million a year to SMS pumping. He linked it to 390 telecom operators whose bot accounts abused Twitter's 2FA. As reported by Group-IB, Twitter then cut ties with operators where more than 10% of SMS traffic looked fraudulent. Treat the figure as Musk's claim rather than an audited number, but the pattern is real.

It helps to separate pumping from OTP harvesting:

  • Pumping hurts the business through inflated bills. The fixes are rate limiting, human checks, phone validation and spend caps.
  • Harvesting is account takeover and hurts users. The fix is phishing-resistant login such as passkeys and FIDO2.

They need different defences, so do not assume one fix covers both.

The warning signs in your data

Most teams discover pumping when the invoice arrives. You can spot it much earlier if you know what to look for:

  • A sudden rise in SMS spend or volume.
  • Messages going to country codes where you have few or no customers.
  • Runs of sequential numbers with the same prefix. Twilio describes this as a spike to blocks of adjacent numbers on the same operator.
  • A falling OTP conversion rate: far fewer codes are entered than sent.
  • Volume spikes overnight or outside your working hours.
  • Many verification attempts that are never completed.

One point I want to stress: a careful attacker can keep total volume roughly flat. Conversion rate per country and per prefix will still show it.

Controls you can add this week

1. Map every billable trigger

List every endpoint that can send an SMS or WhatsApp message without a logged-in user: signup, login OTP, password reset, "resend code", contact forms and phone-change flows. Check the mobile-app API routes as well as the web forms. A forgotten route, such as an endpoint kept alive for an old app version, is easy to miss and just as easy for a bot to call.

2. Allow only the countries you serve

Most services in Iraq and the Kurdistan Region only need +964. Validate the number on the server and reject anything that is not a valid Iraqi mobile number before you ever call the gateway. This is often the biggest single win. Here is an example in PHP using the libphonenumber library:

use libphonenumber\PhoneNumberUtil;
use libphonenumber\PhoneNumberType;
use libphonenumber\PhoneNumberFormat;
use libphonenumber\NumberParseException;

function isAllowedOtpNumber(string $input): ?string
{
    $util = PhoneNumberUtil::getInstance();
    try {
        $number = $util->parse($input, 'IQ');
    } catch (NumberParseException $e) {
        return null;
    }

    $ok = $util->isValidNumber($number)
        && $util->getRegionCodeForNumber($number) === 'IQ'
        && $util->getNumberType($number) === PhoneNumberType::MOBILE;

    // Return E.164 so rate limits use one consistent key
    return $ok ? $util->format($number, PhoneNumberFormat::E164) : null;
}

If you genuinely serve other countries, keep an explicit allow-list rather than an open door, and send SMS only to mobile line types.

3. Rate-limit in layers

A single per-IP limit is easy to get around. Use several limits together:

  • per phone number
  • per block of adjacent numbers
  • per IP
  • globally per hour

Also add a growing resend delay, for example 30 seconds, then 60 seconds, then 5 minutes. In Laravel, a named limiter can return several limits at once:

use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;

RateLimiter::for('otp-send', function (Request $request) {
    // Normalise first, so "+964 750..." and "0750..." share one key
    $phone = isAllowedOtpNumber((string) $request->input('phone')) ?? 'invalid';
    $block = substr($phone, 0, -3); // a block of 1,000 adjacent numbers

    return [
        Limit::perMinute(1)->by('otp:phone:'.$phone),
        Limit::perHour(5)->by('otp:phone-h:'.$phone),
        Limit::perHour(20)->by('otp:block:'.$block),
        Limit::perHour(10)->by('otp:ip:'.$request->ip()),
        Limit::perHour(2000)->by('otp:global'),
    ];
});

// routes/api.php
Route::post('/otp/send', SendOtpController::class)
    ->middleware('throttle:otp-send');

Normalise the number before you use it as a key. Otherwise an attacker can vary the formatting to dodge the per-number limit.

Keep the prefix narrow. A whole operator range is too wide and will throttle real customers. The controller must still reject numbers that fail validation.

The numbers are illustrations; tune them to your real traffic. The global limit is a safety net, so pair it with an alert that tells you when real users start hitting it.

4. Require evidence of a human first

Put a CAPTCHA or similar challenge before the "send code" step, not after it. Apply the same rule to your app API, for example by requiring a valid app session or device token. And do not reveal whether a number is already registered; a uniform response gives bots less to work with.

Monitor conversion and ask your provider

Volume alone is a weak signal. Track codes entered ÷ codes sent, broken down by country and prefix. Alert on sudden drops, sequential-number runs and out-of-hours spikes.

Infobip recommends the same combination: SMS firewalls, limits on messages to particular numbers or prefixes, and conversion monitoring with alerts. Set daily spend caps and volume alerts with your provider too.

When you choose or review a provider, ask:

  • Do you run an SMS firewall or fraud scoring?
  • Can I restrict destination countries?
  • Do you give per-message delivery reports?
  • Can you block a prefix quickly when I report abuse?
  • Can I set spend caps?

As one example of what exists, Twilio's Verify Fraud Guard looks at past traffic for unusual patterns, flags countries an account has never sent to, and blocks the suspected destination prefix (for SMS, not voice). You don't need that specific product, but you should expect equivalent answers from whoever you use.

WhatsApp helps, but it isn't a free pass

Moving OTP to WhatsApp reduces exposure to rogue carrier ranges, but it does not remove the risk. Meta now charges per message, and authentication messages sent to numbers outside your home market are billed at a separate, higher international rate. An unprotected endpoint can still run up a bill.

Many teams are revisiting their WhatsApp OTP code anyway. Meta's zero-tap authentication documentation set 15 October 2026 as the deprecation date for the older PendingIntent-based Android handshake, and recommends its OTP Android SDK for migration. While you are in that code, use the template settings for message time-to-live and code expiry, and keep validity windows short on every channel.

At BulkSMSIraq, which I founded, we send OTPs over WhatsApp, Telegram and SMS from one API, with automatic SMS fallback when WhatsApp or Telegram fails. Whichever provider you use, apply the same country validation and rate limits before the request leaves your server. That way a fallback cannot become a second route for abuse.

Finally, send fewer codes. Offer passkeys to returning users (I covered this in an earlier article), and don't send an OTP when a trusted device session is enough.

Decision table and incident playbook

Signal Likely cause Immediate action Long-term fix
Messages to countries you don't serve Pumping via open destinations Block those country codes Server-side country allow-list
Sequential numbers, same prefix Bot cycling a carrier range Block the prefix with your provider Per-prefix rate limits
Conversion rate falling in one country Slow, low-volume pumping Throttle that country's OTP route Per-country conversion alerts
Overnight volume spike Automated script Lower global limit temporarily Out-of-hours alerting, spend caps
Traffic on an API route with no web activity Bots bypassing the form Require app session or token Human check on every trigger

If you are being pumped right now:

  1. Disable or throttle the affected endpoint.
  2. Block the affected prefixes or countries.
  3. Export the logs (numbers, IPs, timestamps, routes).
  4. Contact your provider and ask about blocking and any review of charges.
  5. Review what changed: a new release, a removed CAPTCHA, or a new API route.

The takeaway

SMS pumping is a billing attack, not a hacking trick, and it succeeds wherever a stranger can trigger a paid message for free. Restrict destinations to the countries you serve, put layered limits and a human check in front of every send, and watch conversion rather than volume. Do those three things this week and you close the routes this fraud depends on most.

Sources & further reading

  1. Twilio Docs: What is SMS Pumping Fraud?twilio.com
  2. Twilio Docs: Verify Fraud Guardtwilio.com
  3. Infobip: Artificially inflated traffic (AIT): Causes and solutionsinfobip.com
  4. Group-IB: SMS Pumping: How Criminals Turn Your Messaging Service into Their Cash Machinegroup-ib.com
  5. Meta for Developers: Zero-tap authentication templates (WhatsApp)developers.facebook.com
  6. Authgear: What Is an SMS Pumping Attack?authgear.com

🤖 Researched and drafted with AI assistance, guided by my editorial standards. Spotted something wrong? Tell me.

Akam Omer
Written by

Akam Omer

IT leader, engineer and security specialist from Erbil with 20+ years across higher education, telecoms, healthcare and government. Founder of BulkSMSIraq, VerifyWay and Kurd.ai.