Text Message Codes: What They Protect and Where They Fall Short
A text message code adds a second step, but it depends on your phone number. Here's what it stops and where SIM swaps and scams get through.
A text message code is a short number the site sends to your mobile phone. You type it in after your password. It's the form of second step most people have met, and it needs no app. It does add protection, and it also has known weak points that come from the phone number itself.
What it protects against
Any second step helps with a stolen password. CISA says any MFA is better than no MFA.1 Google's page puts the same idea this way: any form of two-step verification adds account security.2
A text code means a person who has only your password can't finish the sign-in, unless they can also see your texts. That's the gain. It's a real one for accounts that offer nothing else.
Where it falls short
CISA lists text or email codes as the form people are most familiar with, but says they provide the weakest protection among its main options.3 It advises using one only if stronger options aren't available for that account.3
Google's help page adds that codes sent by texts or calls can be vulnerable to phone number-based hacks.2 The WordPress handbook is shorter: SMS is not a secure communication channel.4
SIM swapping
One documented attack is the SIM swap. Wikipedia describes it as account takeover fraud aimed at a weakness in two-step sign-in when the second step is a text or call to a mobile phone.5
It works because phone companies let customers move a number to a new SIM. That feature is meant for lost phones and phone changes. A fraudster may impersonate the victim, using personal details, and claim to have lost the phone.5 Once the number moves, the fraudster can receive the texts and calls, including one-time passwords.5
There's a knock-on effect. Many services let a password reset go through a recovery phone number alone. A hijacked number can then open many accounts.5
How common is it?
Wikipedia quotes the Microsoft Digital Defense Report 2024, which said less than one-third of one percent of identity attacks use SIM swapping.5 The same line compares that with 99 percent for breach replay, password spray and phishing.5 The figures differ by country and year, so don't read this as a safe-or-unsafe verdict.
Codes you can be talked out of
A text code also has a human weak point. You can be talked into reading it out. Google warns that scammers may try to take over an account this way.2 A caller who asks for the code is signing in with your phone.
Practical points for website owners
- Where the account offers an authenticator app or a security key, CISA lists those as stronger than text or email codes.3 A side-by-side table sets them out.
- If text is the only option, use it. It's still a second step.1
- Check which number is on the account. Google says a new two-step phone number may take up to 7 days to be trusted.2 Other providers will have their own rules.
- Ask your phone company what protections it offers against number transfers. Rules and tools differ by country and provider, and the regulator or consumer body in your country has the official advice.
- Keep backup codes too, because a text code is no help if the phone has no signal or has been lost.
CISA also notes that if you can't use phishing-resistant MFA, number matching can help block mobile push bombardment and SMS-based attacks.1 Number matching is an app feature, so it doesn't apply to a plain text code.
Reference list
- More than a Password, CISA
- Turn on 2-Step Verification, Google Account Help
- Require Multifactor Authentication, CISA (US Cybersecurity and Infrastructure Security Agency)
- Two Step Authentication, WordPress Advanced Administration Handbook
- SIM swap scam, Wikipedia