CVE REFERENCE | CRITICAL VULNERABILITY
Active ThreatSeptember 7, 20219 min read

CVE-2021-40444 Explained: The MSHTML Remote Code Execution Vulnerability

A CVSS 8.8 zero-day in the Windows MSHTML rendering engine that allows RCE through a malicious Office document — no macro prompts, no Enable Content click, no warning dialogs.

Sources:NVD|Microsoft Advisory|MSTIC
Eric Bang
Eric Bang

Founder & Cybersecurity Evangelist

8.8
CVSS Score
Zero-Day
Exploited Before Patch
No Macros
Exploitation Method
All Win
Versions Affected

CVE-2021-40444 is a remote code execution vulnerability in the Microsoft MSHTML engine — the Trident rendering engine built into Windows and used by Internet Explorer, as well as embedded within Microsoft Office for rendering HTML content in documents. The vulnerability was patched on September 14, 2021, but was already being exploited in targeted attacks before Microsoft published its advisory.

What made CVE-2021-40444 particularly notable is its exploitation method: a malicious Office document that achieves code execution without using macros, without triggering Enable Content prompts, and without displaying any security warning dialogs that a user would need to dismiss. For organizations whose security awareness training focuses on macro warnings, this vulnerability represents a blind spot.

How MSHTML Is Abused: ActiveX Without the Warnings

Microsoft Office applications — Word, Excel, PowerPoint — use the MSHTML (Trident) rendering engine to display HTML content embedded in documents. This includes HTML-formatted emails rendered in Word, HTML-based document content, and documents with embedded web content using ActiveX controls.

CVE-2021-40444 exploits this rendering path. A malicious Word document contains an embedded ActiveX control object whose relationship file points to a remote URL — typically hosted on attacker infrastructure or a compromised legitimate site. When the document is opened, Word automatically invokes MSHTML to render the ActiveX content, and MSHTML fetches the remote resource.

The attacker's server responds with a specially crafted CAB archive. MSHTML processes the CAB file and extracts its contents. The CAB contains a malicious DLL. MSHTML loads and executes the DLL in the context of the Office process — with the privileges of the current user.

No macro execution occurs at any stage of this chain. The document does not use VBA, XLM, or any other macro language. The Enable Content button, which security awareness training teaches users to recognize as a danger signal, is never shown. In Protected View configurations, the attack may require the user to click Enable Editing — but that prompt is significantly less alarming than the macro warning.

All supported versions of Microsoft Windows are affected. The vulnerability is in the MSHTML component itself, not in Office specifically, meaning other applications that host MSHTML rendering are also potential attack surfaces.

1

Create malicious Office document

Craft a Word or Office document containing an embedded ActiveX object reference. The object's relationship file (in the document's XML structure) points to an attacker-controlled URL that will serve a malicious payload.

2

Host payload on attacker infrastructure

Set up an HTTP server to respond to document-originated requests with a specially crafted CAB archive containing a malicious DLL. The URL may be hosted directly or through a compromised legitimate web property to evade reputation-based blocking.

3

Deliver document to victim

Send the document as an email attachment, share via file hosting service, or deliver through any channel that results in the victim opening it. Social engineering typically frames the document as a contract, invoice, or legitimate business communication.

4

Document opens, MSHTML fetches payload

When the victim opens the document, Office invokes MSHTML to render the ActiveX content. MSHTML automatically fetches the attacker's URL — no user click required beyond opening the document.

5

CAB extracted, DLL executed

MSHTML processes the fetched CAB archive, extracts the DLL, and loads it in the Office process context. The DLL executes with the victim's user privileges, dropping additional payloads, establishing C2 communication, or performing immediate post-exploitation actions.

CVE-2021-40444 in Active Exploitation

Microsoft's Security Threat Intelligence Center (MSTIC) confirmed that CVE-2021-40444 was under active targeted exploitation before the September 14, 2021 patch. Initial exploitation was attributed to multiple threat actors, suggesting the vulnerability was either independently discovered by multiple groups or shared within closed threat actor communities.

Observed attacks delivered malicious Word documents via phishing emails. The documents were often themed as legal communications, contracts, or business correspondence — document types that recipients commonly open without heightened suspicion. The payloads observed included Cobalt Strike beacons and commodity remote access tools.

Following public disclosure and publication of proof-of-concept code, exploitation expanded beyond initial targeted campaigns to include commodity threat actors. The combination of broad Windows exposure, no macro requirement, and reliable execution made CVE-2021-40444 a high-demand exploit in the period between advisory publication and patch availability.

Microsoft published a temporary workaround — disabling ActiveX controls in Office applications via Group Policy and registry changes — before the full patch was available. Organizations that implemented the workaround quickly were protected; those that waited for Patch Tuesday were exposed for an additional week.

We are aware of targeted attacks that attempt to exploit this vulnerability by using specially-crafted Microsoft Office documents. An attacker could craft a malicious ActiveX control to be used by a Microsoft Office document that hosts the browser rendering engine.

Microsoft Security Response Center, CVE-2021-40444 Advisory

Patching and Mitigating CVE-2021-40444

The complete patch was released September 14, 2021 via Windows Update. Organizations with delayed patching cycles should apply the patch immediately and consider the following defense-in-depth measures.

Apply September 2021 Windows security update

Install the September 14, 2021 cumulative update for all supported Windows versions. The patch addresses the MSHTML CAB extraction and DLL loading vulnerability at the Windows OS layer. This update is required regardless of Office version.

Disable ActiveX controls in Office via Group Policy

Apply GPO setting: User Configuration > Administrative Templates > Microsoft Office 2016 > Security Settings > Disable All ActiveX. This blocks the primary attack vector and should be considered baseline security policy regardless of CVE-2021-40444 patching status.

Enable Protected View for all document sources

Ensure Protected View is enabled for documents originating from the internet, email attachments, and unsafe locations. While CVE-2021-40444 can in some cases execute even in Protected View with Enable Editing clicked, Protected View adds a friction layer that slows attack chains.

Block outbound connections from Office processes

Application control or endpoint security rules that block Office applications (winword.exe, excel.exe, powerpnt.exe) from making outbound HTTP/HTTPS connections prevent the payload fetch step. This breaks the exploit chain before the DLL is downloaded.

Deploy AMSI integration for Office documents

Windows Antimalware Scan Interface (AMSI) integration for Office, available in Microsoft 365 Apps, enables behavioral scanning of document-triggered actions including ActiveX loading. Ensure AMSI-capable endpoint protection is deployed and current.

The bottom line

CVE-2021-40444 closes a gap that security awareness training cannot address: a document that achieves code execution without using macros and without displaying recognizable warning prompts. Training users to avoid clicking Enable Content protects against macro attacks. It does not protect against MSHTML-based ActiveX exploitation in Word documents.

This is why defense-in-depth below the user layer matters. Blocking Office processes from making outbound network connections, disabling ActiveX at the GPO level, and deploying AMSI-capable endpoint protection are controls that operate regardless of user behavior. They do not rely on users recognizing a threat that looks like a normal business document.

MSHTML is a legacy component that carries decades of attack surface. The Trident engine has been the site of numerous critical vulnerabilities over its history. Organizations should evaluate whether any legitimate business processes still require MSHTML-based ActiveX functionality in Office — and if not, disable it permanently as a policy decision, not just a CVE response.

Free newsletter

Get threat intel before your inbox does.

50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, weekly, no spam.

Unsubscribe anytime. We never sell your data.

Eric Bang
Author

Founder & Cybersecurity Evangelist, Decryption Digest

Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals weekly.

CVE-2021-40444MSHTMLActiveXOfficeRCEzero-dayWindowsTrident