Automatic External Mail Forwarding Permitted
Exchange Online lets mailboxes automatically forward mail to external addresses, which attackers use after compromising an account to keep receiving its mail.
| Severity | Medium |
| CVSS 3.1 | 4.3 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N Open in the calculator |
| CVSS 4.0 | 5.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-668: Exposure of Resource to Wrong Sphere |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1114.003 Email Forwarding Rule |
| Category | Security Misconfiguration |
Description
Exchange Online can automatically forward a mailbox's incoming mail to another address through inbox rules created by the user, through the forwarding option in Outlook on the web, or through forwarding set by an administrator. Automatic forwarding to external recipients is governed by the outbound spam filter policies, whose Automatic forwarding rules setting can be left system-controlled, which blocks external forwarding, switched on, or switched off. Remote domain settings can also allow or block automatically forwarded messages to particular domains.
The finding applies where a policy covering some or all users sets automatic forwarding to On, so that mail can be forwarded to any external address without review. Forwarding is a hallmark of business email compromise: after taking over a mailbox, even briefly, attackers commonly create a rule that forwards all mail, or mail containing words such as invoice or payment, to an address they control, often alongside rules that hide replies from the user. The forwarding keeps delivering copies of incoming mail to them after the password is reset and their sessions are revoked, unless the rule is found and removed, which gives them a lasting view of conversations that supports invoice fraud, further phishing and data theft.
Insiders can use the same mechanism to move business mail out of the organisation. The impact is limited to mail received by the affected mailboxes, and it requires either access to a mailbox or the user's own action to create the rule.
The weakness is identified with Get-HostedOutboundSpamFilterPolicy, where AutoForwardingMode is On, with Get-RemoteDomain, and by testing: a rule that forwards to an external mailbox either delivers the message or produces a non-delivery report stating that external forwarding is not allowed. Existing forwarding is found in mailbox properties and inbox rules.
Remediation
- Set automatic forwarding to Off, or to system-controlled, in the default outbound spam filter policy and in every custom policy, and allow forwarding only through a custom policy scoped to named mailboxes with an approved business need.
- Block automatic forwarding in the default remote domain, and allow it only for specific partner domains where required.
- Remove existing external forwarding: review mailbox forwarding settings and inbox rules that forward or redirect mail to external addresses, and investigate any that were not created for a known purpose as a possible compromise.
- Alert on the creation of forwarding and redirect rules, for example through Microsoft Defender alert policies or SIEM detections based on the audit log.
Confirm the fix by creating an inbox rule that forwards to an external test mailbox and checking that the message is not delivered and a non-delivery report is returned.
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 trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.