What is Microsoft MSHTML?
MSHTML (also known as the Trident rendering engine) is Microsoft's HTML rendering engine, originally developed for Internet Explorer. Despite IE's decline, MSHTML remains embedded in Windows and is used by various components including Microsoft Office for rendering web content within documents (HTML email, OLE objects in Word/Excel, etc.). Office applications use MSHTML to process embedded web objects in documents — this deep integration between Office document parsing and the web rendering engine creates a significant attack surface because a malicious document can cause Office to invoke MSHTML to process attacker-controlled web content, triggering any vulnerabilities in the rendering engine or its handling of embedded objects.
Overview
CVE-2021-40444 is a remote code execution vulnerability in Microsoft's MSHTML engine, exploited as a zero-day in targeted attacks beginning in August 2021, weeks before Microsoft patched it in September 2021 Patch Tuesday. The attack uses a specially crafted Office document (typically a .docx file) containing an OLE object that causes Microsoft Word to invoke MSHTML to load a remote HTML file. The HTML file triggers MSHTML to download and process a malicious ActiveX control packaged in a .cab file from an attacker-controlled server. When the ActiveX control installs from the .cab, it executes arbitrary code on the victim's system. The Scope: Changed rating reflects that the exploit crosses security boundaries — from the Office application context into the broader OS.
The zero-day was used in targeted attacks against specific organizations before Microsoft published their security advisory on September 7, 2021. Public proof-of-concept code began circulating after the patch, leading to widespread exploitation by ransomware operators and other threat actors.
Affected Versions
| Product | Vulnerable | Fixed |
|---|---|---|
| Windows 10 / Windows 11 | Yes | September 2021 cumulative update (KB5005565) |
| Windows Server 2016 / 2019 / 2022 | Yes | September 2021 cumulative update |
| Windows 7 SP1 / Windows Server 2008 R2 | Yes | September 2021 update |
| Microsoft 365 Apps / Office 2019 / Office 2016 | Yes | September 2021 Office update |
Technical Details
- Root cause: Microsoft MSHTML fails to properly validate the path used when extracting and loading an ActiveX control from a .cab file fetched via a remote URL — a path traversal (CWE-22) condition allows the extracted DLL to be placed and loaded in an attacker-chosen location
- Attack chain:
- Victim receives a malicious .docx via email or download
- Opening the .docx triggers Word to process an embedded OLE object pointing to a remote URL (attacker-controlled)
- MSHTML fetches the remote URL, which serves an HTML file containing an
<object>element referencing a .cab file - MSHTML downloads the .cab file and extracts it, loading the contained ActiveX DLL
- The ActiveX DLL executes as arbitrary code in the context of the Word process
- Scope: Changed: Code execution escapes the confines of the Office sandbox and affects the broader OS
- User interaction: The victim must open the malicious .docx file (UI:R) — typically delivered via spear-phishing email
- Pre-patch mitigation: Before the September 2021 patch, Microsoft recommended disabling ActiveX controls in Internet Explorer to break the attack chain
- Post-patch exploitation: After the patch and PoC publication, the attack technique was adapted by ransomware groups who used it against organizations with unpatched systems
Discovery
First observed in targeted attacks in August 2021. Multiple security firms identified samples before Microsoft's public advisory. EXPMON researchers reported the zero-day to Microsoft. Microsoft's September 7, 2021 advisory (before the patch) confirmed active exploitation and provided interim mitigations.
Exploitation Context
CVE-2021-40444 attracted significant attention because it required only opening a .docx file — no macros, no "Enable Content" required. The attack worked even in Protected View in some configurations, making it particularly dangerous as a phishing payload. Initial exploitation was targeted (specific industries and geographies). After the September 7, 2021 advisory made the technique public, exploitation broadened significantly. By the time CISA added it to KEV in November 2021, ransomware operators had incorporated it into initial access toolkits. The ransomwareUse flag reflects confirmed ransomware deployment via this vulnerability.
Remediation
- Apply September 2021 cumulative update for Windows (KB5005565 for Windows 10 21H1 or equivalent) and the September 2021 Office update
- Disable ActiveX controls in Internet Explorer zone settings as an additional mitigation (Group Policy: Computer Configuration → Windows Settings → Internet Explorer → Security Zones → Disable ActiveX controls in Internet Zone)
- Enable Attack Surface Reduction rule: "Block all Office applications from creating child processes" to prevent the document → MSHTML → code execution chain
- Configure Microsoft Defender for Office 365 Safe Attachments to scan .docx and .rtf files before delivery
- Deploy network controls to block outbound HTTP/HTTPS connections from Office applications to untrusted internet hosts (application-layer filtering)
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2021-40444 |
| Vendor / Product | Microsoft — MSHTML |
| NVD Published | 2021-09-15 |
| NVD Last Modified | 2025-10-30 |
| CVSS 3.1 Score | 8.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L |
| Severity | HIGH |
| CWE | CWE-22 find similar ↗ |
| CISA KEV Added | 2021-11-03 |
| CISA KEV Deadline | 2021-11-17 |
| Known Ransomware Use | ⚠️ Yes |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2021-08-18 | First malicious documents exploiting CVE-2021-40444 observed in targeted attacks |
| 2021-09-07 | Microsoft publishes security advisory for CVE-2021-40444 as a zero-day under active exploitation, with mitigations prior to patch |
| 2021-09-14 | Microsoft patches CVE-2021-40444 in September 2021 Patch Tuesday (KB5005565) |
| 2021-09-15 | CVE published; public proof-of-concept exploits begin circulating |
| 2021-11-03 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2021-11-17 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Microsoft Security Response Center — CVE-2021-40444 | Vendor Advisory |
| Microsoft Security Blog — Analyzing CVE-2021-40444 Exploits | Security Research |
| NVD — CVE-2021-40444 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |