Skip to main content
LowEmailOWASP A05:2021CWE-16

How to fix: SPF record has no all mechanism

The SPF record ends without an all mechanism and without a redirect modifier. Any sender not matched by an earlier mechanism therefore gets the default result, neutral.

Why it matters

Neutral is defined to be treated exactly like no policy at all, so every sender the record does not list is neither permitted nor denied. Listed senders still pass, which makes the record look like it is working, while the thing SPF exists to say, that everyone else is not authorised, is simply absent.

The all mechanism is what turns an SPF record from an open list into a closed one. Use -all once you are confident every legitimate sender is covered, or ~all while you are still finding them, and let DMARC aggregate reports show you what is missing before tightening. A record with neither is the only variant that says nothing whatsoever about unlisted senders.

How to fix it

  1. 1Add ~all to the end of the record while you confirm every legitimate sender is listed.
  2. 2Use DMARC aggregate reports to find senders the record does not yet cover.
  3. 3Tighten to -all once the reports come back clean.

Code examples

Closed policy

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

References

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

See every email check

Questions

How severe is SPF record has no all mechanism?
VulnRadar rates this low 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-all-mechanism-missing, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does SPF record has no all mechanism map to?
It maps to CWE-16. In the OWASP Top 10 it falls under A05: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 has no all mechanism

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

How to fix: SPF record has no all mechanism | VulnRadar