Threat overview
| Threat | Description | Impact |
|---|---|---|
| SMS pumping | Attackers trigger thousands of SMS verifications to premium-rate numbers | Inflated costs, sometimes $10K+ per incident |
| Toll fraud (IRSF) | Exploiting call verification to generate revenue on premium international numbers | Per-minute charges on fraudulent calls |
| Brute-force attacks | Systematically guessing verification codes | Account takeover |
| Code interception | SIM swapping, SS7 attacks, malware intercepting SMS | Account compromise |
| Enumeration | Using verification endpoints to check if phone numbers exist in your system | Privacy leak, targeted attacks |
Rate limiting
Rate limiting is your first line of defense against abuse. Apply limits at multiple layers.Per-phone-number limits
Restrict how many verification attempts a single phone number can trigger within a time window.Per-IP address limits
Prevent a single IP from triggering verifications for many different numbers (a hallmark of SMS pumping):Recommended limits
| Scope | Limit | Window |
|---|---|---|
| Per phone number | 3 attempts | 10 minutes |
| Per phone number | 5 attempts | 1 hour |
| Per IP address | 10 attempts | 1 hour |
| Per account/session | 5 attempts | 1 hour |
| Global (all numbers) | Monitor for spikes | Continuous |
SMS pumping prevention
SMS pumping is the most costly fraud vector for verification flows. Attackers abuse your send endpoint to generate SMS revenue on number ranges they control.Detection signals
Watch for these patterns:- Sequential numbers — Verification requests for
+1234500001,+1234500002,+1234500003… - Unusual country codes — Spike in verifications to countries you don’t serve
- High failure rate — Many verifications triggered but never completed
- Burst traffic — Sudden spike in verification requests from a single source
Defenses
Restrict destination countries
Configure
whitelisted_destinations on your Verify profile to only allow countries where your users are:Require authentication before verification
Don’t expose your verification endpoint to unauthenticated users. Require at least a session or account to trigger a verification.
Add CAPTCHA
Place a CAPTCHA (reCAPTCHA, hCaptcha, Turnstile) before the phone number input to block automated submissions.
Code security
Use appropriate code length
Longer codes are harder to brute-force but harder for users to enter. Balance security and usability:| Code Length | Combinations | Brute-force time (3 attempts/min) | Recommendation |
|---|---|---|---|
| 4 digits | 10,000 | ~55 hours | Low security only |
| 5 digits | 100,000 | ~23 days | Default — good balance |
| 6 digits | 1,000,000 | ~231 days | High security applications |
Set appropriate timeouts
Short timeouts reduce the window for brute-force attacks:A 5-minute timeout (300 seconds) works well for most applications. Shorter timeouts (120s) add security but may frustrate users on slow networks.
Limit verification attempts
Lock out after too many failed code entries to prevent brute-force:Prevent number enumeration
Don’t reveal whether a phone number exists in your system through verification responses:Vulnerable vs. secure response patterns
Vulnerable vs. secure response patterns
❌ Vulnerable — reveals whether the number is registered:✅ Secure — same response regardless:
Channel fallback strategy
Use multiple verification channels to improve delivery and security:Fallback: Voice call
If SMS isn’t delivered within 30 seconds, offer a voice call option. This helps users on networks with delayed SMS delivery.
Webhook security for Verify
Secure your verification webhook endpoint to prevent spoofed delivery notifications:- Allowlist Telnyx IPs — Only accept webhooks from
192.76.120.192/27 - Use HTTPS — Never use plain HTTP for webhook endpoints
- Validate payload structure — Check for expected fields before processing
- Don’t trust client-side status — Always verify through webhooks or API, never trust client-reported verification status
Security checklist
Use this checklist when implementing Telnyx Verify in production:Rate limiting
Rate limiting
- Per-phone-number rate limit (3/10min)
- Per-IP rate limit (10/hour)
- Per-account/session rate limit
- Global volume monitoring and alerting
Fraud prevention
Fraud prevention
- Country allowlist configured on Verify profile
- CAPTCHA before verification trigger
- Authentication required before sending verification
- SMS pumping detection (sequential numbers, country spikes)
Code security
Code security
- Appropriate code length (5-6 digits)
- Short timeout (300 seconds or less)
- Max failed attempts lockout (5 attempts)
- Consistent responses (no number enumeration)
Infrastructure
Infrastructure
- HTTPS webhook endpoints
- Telnyx IP allowlisting for webhooks
- Server-side verification only (never trust client)
- Logging and monitoring for anomalies