Safe Attachments should scan email attachments for your recipients
This check looks at whether a Safe Attachments policy in Microsoft Defender for Office 365 is turned on and applies to your recipients. The safe setting is a policy whose unknown-malware response is Block or Dynamic Delivery rather than Off, covering all users and domains.
Why it matters
Safe Attachments opens email attachments in a virtual environment and checks them for malware, ransomware and phishing before they reach the recipient. It adds a layer on top of ordinary anti-malware scanning, which catches known threats but not necessarily a file built last week.
There is no default Safe Attachments policy. Microsoft's Built-in protection preset covers recipients who are not named in any other policy, but custom policies take precedence for the people they apply to, so one policy set to Off, or one that only names a few departments, can leave gaps. Microsoft's documentation also says Off is not recommended for most users.
Source: Microsoft Learn, Safe Attachments in Microsoft Defender for Office 365.
How to check it yourself
In the Microsoft Defender portal open Email & collaboration > Policies & rules > Threat policies > Safe Attachments. Check each policy's recipient scope and its unknown-malware response, and note whether the Built-in protection preset applies to anyone left over.
Read-only with Exchange Online PowerShell:
Connect-ExchangeOnline
Get-SafeAttachmentPolicy | Format-Table Name,Action,Enable,QuarantineTag
Get-SafeAttachmentRule | Format-Table Name,Priority,State,SentToMemberOf,RecipientDomainIsLook for policies with an Action that does not scan attachments (the Off setting in the portal), and for rules whose scope leaves some mailboxes uncovered. If the cmdlets are missing, the organisation may not have Defender for Office 365 available; confirm that against Microsoft's documentation.
How to fix it
The simplest route is a preset security policy. In the Defender portal go to Email & collaboration > Policies & rules > Threat policies > Preset security policies and apply the Standard or Strict preset to all recipients. To use a custom policy instead:
- Open Threat policies > Safe Attachments and select Create.
- Name the policy and apply it to your accepted domains so every recipient is included.
- Set the unknown malware response to Block, or Dynamic Delivery if you want messages to arrive immediately with a placeholder.
- Consider blocking messages whose encrypted attachments cannot be scanned, and keep the priority below stricter policies.
Microsoft notes that a new policy typically takes about 30 minutes to take effect. ConfigCobra never changes your tenant; it reports the finding and suggests these steps or an Exchange Online PowerShell script for you to review and run.
What changes when you fix it
Recipients can see delivery delays for messages with attachments, since scanning typically completes within 15 minutes but can take longer. Dynamic Delivery avoids the delay by showing a placeholder until the scan finishes, and it works only for Exchange Online mailboxes.
Messages with detected malware are quarantined, and by default only administrators can review or release them, so the security or help-desk team needs a process for release requests. Password-protected attachments that cannot be scanned may also be held if you enable that option, which affects teams that routinely exchange protected files.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Microsoft 365 Foundations v7.0.0 | 2.1.4 | E5 Level 2 |
More checks in Microsoft Defender
- Safe Links for Office Applications should be enabledCIS 2.1.1
- The common attachment types filter should be enabledCIS 2.1.2
- Notifications for internal users sending malware should be enabledCIS 2.1.3
- Safe Attachments for SharePoint, OneDrive, and Microsoft Teams should be enabledCIS 2.1.5
- Exchange Online spam policies should notify administratorsCIS 2.1.6
Go further
- Microsoft Defender21 controls in this section
- CIS Microsoft 365 Foundations v7.0.0160 controls
- CIS Microsoft 365 Foundations checklistEvery control in one list, as CSV
- RemediationSee what a fix changes in your tenant before you apply it, then use the generated script
- Monitoring & DriftScheduled scans, drift detection and email alerts when a control regresses
Check this on your Microsoft 365
ConfigCobra runs this check with every other control of the CIS Microsoft 365 Foundations Benchmark, read-only.