Rapid7 Vulnerability & Exploit Database

Microsoft Exchange Server DlpUtils AddTenantDlpPolicy RCE

Back to Search

Microsoft Exchange Server DlpUtils AddTenantDlpPolicy RCE



This vulnerability allows remote attackers to execute arbitrary code on affected installations of Exchange Server. Authentication is required to exploit this vulnerability. Additionally, the target user must have the "Data Loss Prevention" role assigned and an active mailbox. If the user is in the "Compliance Management" or greater "Organization Management" role groups, then they have the "Data Loss Prevention" role. Since the user who installed Exchange is in the "Organization Management" role group, they transitively have the "Data Loss Prevention" role. The specific flaw exists within the processing of the New-DlpPolicy cmdlet. The issue results from the lack of proper validation of user-supplied template data when creating a DLP policy. An attacker can leverage this vulnerability to execute code in the context of SYSTEM. Tested against Exchange Server 2016 CU19 on Windows Server 2016.


  • Leonard Rapp
  • Markus Vervier
  • Steven Seeley
  • Yasar Klawohn
  • wvu <wvu@metasploit.com>
  • Spencer McIntyre




x86, x64


Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/http/exchange_ecp_dlp_policy
msf exploit(exchange_ecp_dlp_policy) > show targets
msf exploit(exchange_ecp_dlp_policy) > set TARGET < target-id >
msf exploit(exchange_ecp_dlp_policy) > show options
    ...show and set options...
msf exploit(exchange_ecp_dlp_policy) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security