Skip to main content
HighEmailOWASP A07:2021CWE-290

How to fix: SPF Record Uses +all (Explicitly Permits Any Sender)

The SPF record's terminal mechanism is +all (or has no all mechanism and defaults permissively), which explicitly authorizes every server on the Internet to send mail as this domain. This is stronger, and worse, than simply omitting -all: it is an affirmative statement that any sender is allowed, not just the absence of a restriction.

Why it matters

Any server anywhere can send email that passes SPF for this domain. Combined with a weak or absent DMARC policy, this makes phishing and business email compromise (BEC) using this domain's name trivial, since the SPF check that receivers rely on to filter spoofed mail is explicitly disabled rather than merely missing.

SPF's all mechanism sets the default outcome for senders not matched by any earlier mechanism. -all means hard fail (reject), ~all means soft fail (flag), ?all means neutral, and +all means pass: explicitly authorizing everyone. +all is functionally equivalent to having no SPF record at all for the purpose of blocking spoofing, but is worse in practice, because it signals that the domain owner deliberately reviewed and approved unrestricted sending, and it silences the separate "no SPF record" warning that might otherwise prompt a fix.

How to fix it

  1. 1Remove +all and replace it with -all (hard fail) once all legitimate senders are enumerated in the record.
  2. 2If not yet ready for hard fail, use ~all (soft fail) as an interim step rather than +all.
  3. 3Audit every mechanism in the record (include:, ip4:, ip6:, a:, mx:) to confirm it reflects your actual mail-sending infrastructure before tightening the all mechanism.

Code examples

Permissive: allows anyone

DNS
example.com. IN TXT "v=spf1 include:_spf.google.com +all"
# +all authorizes every sender on the Internet, not just Google

Correct: hard fail

DNS
example.com. IN TXT "v=spf1 include:_spf.google.com -all"

References

Detected automatically by VulnRadar. The check id is email-spf-plus-all, stable across every scan so you can filter or diff on it.

See every email check

Questions

How severe is SPF Record Uses +all (Explicitly Permits Any Sender)?
VulnRadar rates this high severity in the email category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id email-spf-plus-all, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does SPF Record Uses +all (Explicitly Permits Any Sender) map to?
It maps to CWE-290. In the OWASP Top 10 it falls under A07:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for spf record uses +all (explicitly permits any sender)

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

SPF Record Uses +all (Explicitly Permits Any Sender) | VulnRadar