← Vulnerability feed

Vulnerability record · CVE-2017-8540 · published 26 May 2017

CVE-2017-8540: Microsoft Malware Protection Engine out-of-bounds write via crafted file

Microsoft · Malware Protection Engine

The Microsoft Malware Protection Engine, used by Windows Defender, Forefront, Security Essentials, System Center Endpoint Protection, Intune Endpoint Protection and Exchange Server, fails to properly scan a specially crafted file, causing memory corruption. Because the engine runs with high privileges as part of the antimalware service, a successful write primitive can lead to code execution in that context.

7.8 CVSS 3.1 High CISA KEV since 3 Mar 2022 EPSS 72% · top 0.6% CWE-787 · Out-of-bounds write
7.8CVSS 3.1 base score, v2 9.3
72%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
9Affected product versions listed by NVD
9References, 2 tagged exploit
17 Jun 2026Last modified by NVD

Description

The Microsoft Malware Protection Engine running on Microsoft Forefront and Microsoft Defender on Microsoft Windows Server 2008 SP2 and R2 SP1, Windows 7 SP1, Windows 8.1, Windows Server 2012 Gold and R2, Windows RT 8.1, Windows 10 Gold, 1511, 1607, and 1703, and Windows Server 2016, Microsoft Exchange Server 2013 and 2016, does not properly scan a specially crafted file leading to memory corruption. aka "Microsoft Malware Protection Engine Remote Code Execution Vulnerability", a different vulnerability than CVE-2017-8538 and CVE-2017-8541.

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

high priorityIt is in CISA KEV with a public exploit and very high EPSS, but the vector requires local access and user interaction, and the flaw is from 2017 with a vendor patch available.

What it is

The Microsoft Malware Protection Engine, used by Windows Defender, Forefront, Security Essentials, System Center Endpoint Protection, Intune Endpoint Protection and Exchange Server, fails to properly scan a specially crafted file, causing memory corruption. Because the engine runs with high privileges as part of the antimalware service, a successful write primitive can lead to code execution in that context.

Impact

An attacker who gets a crafted file scanned by the engine can corrupt memory and potentially execute arbitrary code with the privileges of the Malware Protection Engine service, which is typically SYSTEM on Windows hosts.

Attack surface

Reached locally by delivering a specially crafted file that the engine scans; the CVSS vector requires user interaction (UI:R) and no privileges (PR:N), so the victim must cause the file to be scanned, for example by opening or receiving it.

Exploitation

CISA added this to the Known Exploited Vulnerabilities catalog on 2022-03-03 with a 2022-03-24 remediation due date, and EPSS shows a 30-day probability of 0.71961 (99.4th percentile); a public Exploit-DB entry (42088) exists, though no ransomware use is documented.

What to do

  • Apply the Microsoft security update for the Malware Protection Engine referenced in the MSRC advisory for CVE-2017-8540.
  • Verify the installed engine version is at or above the fixed build across all affected products, including Exchange servers and endpoint protection clients.
  • Restrict or filter untrusted file attachments and downloads reaching mail and endpoint scanning paths.
  • Where feasible, limit the privileges and exposure of antimalware scanning services on legacy platforms such as Windows Server 2008 and Windows 7.

Detection

  • Monitor for crashes or unexpected restarts of the antimalware engine service (MsMpEng) that could indicate malformed-file handling.
  • Hunt for processes spawned by the Malware Protection Engine service, which should not normally create child processes.
  • Review endpoint telemetry for suspicious files written to disk shortly before engine faults or service restarts.
  • Check asset inventory for hosts still running unpatched engine versions on the affected Windows and Exchange platforms.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2017-8540 to the Known Exploited Vulnerabilities catalog on 3 March 2022 as "Microsoft Malware Protection Engine Improper Restriction of Operations Vulnerability". Required action: Apply updates per vendor instructions. Federal deadline 24 March 2022.

Affected products

9 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://www.securityfocus.com/bid/98703 Broken LinkThird Party AdvisoryVDB Entry
http://www.securitytracker.com/id/1038571 Broken LinkThird Party AdvisoryVDB Entry
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-8540 MitigationPatchVendor Advisory
https://www.exploit-db.com/exploits/42088/ ExploitThird Party AdvisoryVDB Entry
http://www.securityfocus.com/bid/98703 Broken LinkThird Party AdvisoryVDB Entry
http://www.securitytracker.com/id/1038571 Broken LinkThird Party AdvisoryVDB Entry
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-8540 MitigationPatchVendor Advisory
https://www.exploit-db.com/exploits/42088/ ExploitThird Party AdvisoryVDB Entry
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-8540 US Government Resource

Track CVE-2017-8540 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2024-21410Microsoft Exchange Server improper authentication privilege escalationCVE-2024-21410 is an improper authentication (CWE-287) elevation of privilege flaw in Microsoft Exchange Server. It is network-reachable with no priv…KEVEPSS 13%analysed9.1CVE-2021-34473Microsoft Exchange Server SSRF Enables Remote Code ExecutionCVE-2021-34473 is a critical server-side request forgery (SSRF) flaw in Microsoft Exchange Server that leads to remote code execution. It is part of …KEVEPSS 100%analysed9.1CVE-2021-26855Microsoft Exchange Server SSRF enabling remote code executionCVE-2021-26855 is a server-side request forgery (CWE-918) in Microsoft Exchange Server that is part of the ProxyLogon exploit chain and can lead to r…KEVEPSS 100%analysed9.0CVE-2021-34523Microsoft Exchange Server privilege escalation flawCVE-2021-34523 is a privilege escalation vulnerability in Microsoft Exchange Server. It is a component of the ProxyShell exploit chain, where it is u…KEVEPSS 100%analysed8.8CVE-2023-21529Microsoft Exchange Server deserialization flaw enables remote code executionCVE-2023-21529 is a deserialization of untrusted data vulnerability (CWE-502) in Microsoft Exchange Server that allows remote code execution. It carr…KEVEPSS 59%analysed8.8CVE-2022-41080Microsoft Exchange Server elevation of privilegeCVE-2022-41080 is an elevation of privilege vulnerability in Microsoft Exchange Server. A network-reachable attacker with low privileges can exploit …KEVEPSS 77%analysed8.8CVE-2022-41040Microsoft Exchange Server SSRF elevation of privilegeCVE-2022-41040 is a server-side request forgery (SSRF) flaw in Microsoft Exchange Server that allows an authenticated attacker to escalate privileges…KEVEPSS 100%analysed8.8CVE-2021-42321Microsoft Exchange Server remote code execution flawCVE-2021-42321 is a remote code execution vulnerability in Microsoft Exchange Server. It is remotely reachable over the network with low complexity, …KEVEPSS 92%analysed

Source: NIST National Vulnerability Database (record CVE-2017-8540), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.