SPF Record Missing or Permissive

The domain has no SPF record, or one that authorises too many senders or fails to evaluate, so receivers cannot tell legitimate mail from forged mail using it.

SeverityLow
CVSS 3.13.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N Open in the calculator
CVSS 4.02.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-290: Authentication Bypass by Spoofing
OWASP Top 10A07:2025 Authentication Failures
MITRE ATT&CKT1684.002 Email Spoofing, T1566 Phishing
CategorySecurity Misconfiguration

Description

Sender Policy Framework (SPF, RFC 7208) lets a domain owner publish, in a DNS TXT record, the servers that are allowed to send email using the domain in the envelope sender (the SMTP MAIL FROM address, also known as the return path). Receiving mail servers compare the connecting server's IP address with the record and use the result as evidence of whether a message is genuine. SPF checks only the envelope sender, so the From address that recipients see is protected only through DMARC, which SPF also underpins: DMARC relies on an aligned SPF or DKIM result.

Where the record is missing or permissive, an attacker can send email that claims to come from the domain, and receiving servers have less evidence on which to reject or flag it. This supports phishing and fraud against the organisation's staff, customers and suppliers, and can harm the domain's reputation. Where an enforced DMARC policy and DKIM signing are in place, a weak SPF record mainly affects deliverability, but where DMARC is missing or not enforced, SPF is one of the few signals receivers have. Success also depends on each recipient's own filtering.

The weakness takes several forms: no SPF record at all; a record ending in +all, which authorises every server on the internet, or ?all, which asserts nothing; mechanisms that authorise far more than the organisation's own senders, such as broad IP ranges or include entries for services no longer used; records that need more than ten DNS lookups to evaluate, or more than one SPF record for the same name, both of which cause a permanent error so that SPF gives no protection; and domains and subdomains that send no email but do not publish v=spf1 -all. A record ending in ~all (soft fail) is common, and acceptable alongside an enforced DMARC policy. The record is checked with a DNS query, such as dig TXT or nslookup -type=txt, and an SPF validation tool.

Remediation

Publish an accurate SPF record for every domain and subdomain, and pair it with DKIM and DMARC:

  • List every service that sends email using the domain, including the main mail platform, marketing, ticketing and billing services and on-premises applications, and publish a single TXT record that authorises only those. For example, a domain whose only sender is Microsoft 365 publishes the record below; other services document the include value to add.
v=spf1 include:spf.protection.outlook.com -all
  • End the record with -all (fail), or with ~all (soft fail) where an enforced DMARC policy is in place; never use +all or ?all.
  • Keep evaluation within ten DNS lookups by removing entries for services no longer used and avoiding the ptr mechanism, and publish only one SPF record per name.
  • For domains and subdomains that never send email, publish v=spf1 -all together with a DMARC policy of reject.
  • Deploy DKIM signing and an enforced DMARC policy, since SPF on its own does not protect the From address that recipients see.

Confirm the fix by querying the TXT record and checking it with an SPF validation tool, then sending a test message through each legitimate service and checking that the receiving server records an SPF pass in the Authentication-Results header.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Email and DNS Findings

Every Email and DNS finding