How does a texted code work?
The service keeps your phone number on file. When you sign in, it sends a short code by text or voice call, and you type that code back in.
NIST calls this "out-of-band" verification, because the code comes through a separate channel from the sign-in page. In NIST's guidance, the public phone network (PSTN) is the path for SMS and voice.1
CISA lists text message or voice message among the popular forms of multifactor authentication.2
Are texted codes safe enough?
Better than a password alone. Weaker than other options. Both are true.
CISA's own words: not every method protects equally, but any MFA is better than no MFA.2 So if text codes are the only choice your app offers, turn them on.
What do security agencies say about them?
NIST's digital identity guidance marks the phone network as "RESTRICTED" for this use. The document says use of the PSTN for out-of-band verification is restricted.1
That label comes with conditions. NIST says a service should consider risk signs such as a device swap, a SIM change or number porting before it sends a code that way.1
It also says a service that accepts a restricted method must offer at least one other method that isn't restricted.1
CISA points the same direction. If a business can't yet move to phishing-resistant MFA, CISA suggests number matching to block mobile push bombardment and SMS-based attacks.2
What are the weak spots?
NIST's own list of attack types includes two that affect text codes:
- A code sent by SMS is received by an attacker who has convinced the mobile operator to redirect the victim's phone to the attacker.1
- A malicious app on the phone reads the code sent by SMS, and the attacker uses it to sign in.1
What happens when my phone number changes?
The service ties your codes to a number it has on file. NIST says that when a service uses the phone network, it must check that the pre-registered number belongs to a specific physical device.1
It also says changing that number counts as binding a new authenticator, and that this should only happen through the proper process. So a number change usually isn't something you can do on the sign-in screen alone.1
If you're about to switch carriers or phones, update the number in your app's security settings first, while the old one still works.
Can an admin turn text codes off?
Some business apps let them. Google Workspace has an enforcement option that blocks them. Its label reads "Any except verification codes via text, phone call".3
Google warns what happens next: users who use texts and phone calls to verify will be locked out of their accounts. Admins are told to get those users onto another method before the enforcement date.3
That's one maker's setting. Other apps differ, so check the settings page of the app you use.
What are the other choices?
The authenticator app makes codes on the phone with no text involved. A security key or passkey skips typing a code at all. And if you rely on texts, set up backup codes in case your number changes.
Sources used
- NIST Special Publication 800-63B: Digital Identity Guidelines, Authentication and Lifecycle Management, National Institute of Standards and Technology (NIST)
- More than a Password, Cybersecurity and Infrastructure Security Agency (CISA)
- Deploy 2-Step Verification, Google Workspace Help