Skip to main content
Mallory
HighCISA KEVExploited in the wildPublic exploit

Microsoft MSHTML Remote Code Execution Vulnerability

IdentifiersCVE-2021-40444CWE-94

CVE-2021-40444 is a remote code execution vulnerability in Microsoft Windows' MSHTML browser rendering engine that can be triggered through specially crafted Microsoft Office documents. Microsoft stated that an attacker can craft a malicious ActiveX control referenced by an Office document that hosts the browser engine. Observed exploitation used external oleObject relationships to retrieve attacker-controlled MIME HTML content containing exploit code, which then downloaded a CAB file with a DLL disguised as an INF file, decompressed it, and executed code via control.exe/rundll32-related behavior. Microsoft reported that when the malicious document is opened without Mark of the Web present, payload execution can occur immediately without additional user interaction beyond opening the file. The vulnerability was exploited in the wild in targeted attacks and used as an initial access vector to deliver follow-on payloads including custom Cobalt Strike loaders and other malware.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation allows arbitrary code execution on the victim system in the security context of the current user. Impact is greater when the user has administrative privileges. In observed campaigns, exploitation enabled initial compromise and delivery of second-stage malware, including Cobalt Strike Beacon loaders, PowerShell-based payloads, and other follow-on tooling that could support credential theft, lateral movement, persistence, data theft, and broader enterprise compromise.

Mitigation

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

If patching cannot be performed immediately, disable the installation of all ActiveX controls in Internet Explorer via the documented registry-based workaround. Microsoft also stated that environments with the Attack Surface Reduction rule 'Block all Office applications from creating child processes' enabled were not impacted by the exploitation technique described in the observed attacks. Keep antimalware protections current and reduce user privileges to limit impact.

Remediation

Patch, then assume compromise.

Apply Microsoft's September 2021 security updates for CVE-2021-40444 immediately on affected Windows systems and Office environments. Ensure Microsoft Defender Antivirus and Microsoft Defender for Endpoint are updated; Microsoft specifically referenced detection build 1.349.22.0 or newer during active exploitation. Validate that all applicable cumulative/security updates for the affected Windows/MSHTML components are installed across the fleet.
PUBLIC EXPLOITS

Exploits

8 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (7 hidden).

VALID 8 / 15 TOTALView more in app
CVE-2021-40444_buildersMaturityPoCVerified exploit

This repository provides a full builder toolkit for constructing exploits targeting CVE-2021-40444, a critical Microsoft Office Word remote code execution vulnerability. The structure includes a set of Python scripts: 'generate_cab.py' creates a malicious CAB archive containing an attacker-supplied DLL; 'generate_html.py' produces an HTML file referencing the CAB file; and 'generate_doc.py' crafts a Word document (.docx) that embeds an external OLE object reference to the attacker's HTML or CAB file. The 'doc' directory contains template Office XML files that are modified by the scripts to include the malicious references. The README provides detailed instructions for using the toolkit, including AV evasion tips (such as using uppercase 'HTTP' and backslashes in URLs). The exploit chain is: (1) attacker prepares a DLL payload, (2) builds a CAB file, (3) hosts the CAB and HTML files, (4) generates a malicious .docx that references the attacker's content, and (5) delivers the document to a victim. When opened, the document causes Office to fetch and execute the attacker's DLL, resulting in arbitrary code execution. The repository is operational and can be used to generate working exploits for CVE-2021-40444, with customizable payloads and network endpoints.

aslitsecurityDisclosed Sep 12, 2021pythonnetworkfile
CVE-2021-40444MaturityPoCVerified exploit

This repository is a fully weaponized exploit generator for CVE-2021-40444 (Microsoft Office Word Remote Code Execution) and CVE-2022-30190 (Follina, ms-msdt). It contains Python scripts (generator.py, cab_parser.py) to automate the creation of malicious DOCX/RTF files that exploit these vulnerabilities. The generator can embed arbitrary attacker-supplied payloads (DLLs, scripts) and supports multiple exploit chains, including CAB-based, CAB-less (RAR, HTML smuggling), and Follina (ms-msdt) variants. The exploit works by crafting a DOCX/RTF file that references a malicious HTML file, which in turn triggers the download and execution of a payload via ActiveX, CAB path traversal, or the ms-msdt protocol. The repository includes templates for the malicious HTML, test payloads (calc.exe launchers in various scripting languages), and a simple Python web server for hosting the payloads. The exploit is highly customizable and operational, supporting arbitrary code execution on vulnerable Windows systems with Microsoft Office. Notable endpoints include the use of HTTP(S) servers for payload delivery and various file paths in the Windows temp directories for payload drop and execution. The structure is modular, with clear separation between payload generation, file templates, and server hosting.

klezVirusDisclosed Sep 15, 2021pythonjavascriptnetworkdocumentbrowser
CVE-2021-40444MaturityPoCVerified exploit

This repository provides a full proof-of-concept exploit for CVE-2021-40444, a critical remote code execution vulnerability in Microsoft Windows MSHTML (Trident) engine, exploited via malicious Office documents. The structure includes: - A 'maldoc' directory containing the components of a malicious DOCX file, with instructions to modify 'document.xml.rels' to point to a hosted HTML exploit. - 'www/exploit.html' and 'www/deob.html' are the obfuscated and deobfuscated HTML exploit files, respectively. These files use JavaScript and ActiveX to trigger the vulnerability and fetch a malicious CAB file containing a DLL payload. - 'patch_cab.py' and 'deobfuscate.py' are helper scripts for preparing the CAB file and deobfuscating the HTML exploit. - The payload is a DLL (calc.dll) that, when executed, launches calc.exe as a demonstration of code execution. - The README.md provides detailed step-by-step instructions for generating the malicious DOCX, CAB, and setting up the HTTP server to deliver the exploit chain. The exploit chain is as follows: a user opens the crafted DOCX, which loads a remote HTML file (exploit.html) via MSHTML. The HTML triggers the vulnerability, causing the system to fetch and execute a DLL from a CAB file, resulting in arbitrary code execution. The exploit is operational and demonstrates real code execution, but the payload is a simple demonstration (calc.exe).

lockedbyteDisclosed Sep 10, 2021pythonhtmlnetworkfile
CVE-2021-40444-SampleMaturityPoCVerified exploit

This repository is a proof-of-concept (POC) exploit for CVE-2021-40444, a remote code execution vulnerability in Microsoft Internet Explorer (and related Windows components) via malicious ActiveX controls. The repository contains two files: a brief README and a 'poc.html' file. The HTML file contains obfuscated JavaScript that creates multiple iframes and ActiveX objects, then attempts to download a malicious CAB file from 'http://localhost/trojan.cab' and load it using a specific ActiveX class ID. The script also manipulates file paths such as 'AppData/Local/Temp/Low/whoiam.inf' to potentially drop or interact with files on the target system. The exploit is designed to be opened in Internet Explorer 11 on Windows, with ActiveX enabled, and demonstrates the attack vector but does not include a real payload (the CAB file is referenced as 'localhost'). This POC is intended for research and demonstration purposes.

k4k4Disclosed Sep 10, 2021htmljavascriptbrowser
CVE-2021-40444MaturityPoCVerified exploit

This repository is a fully weaponized exploit generator for CVE-2021-40444, a critical Microsoft Office Word Remote Code Execution vulnerability. The exploit leverages a crafted .docx file that references a malicious HTML file, which in turn uses ActiveX and path traversal in a CAB file to drop and execute an attacker-controlled DLL or script via the .cpl URI handler. The repository includes Python scripts (generator.py, cab_parser.py) to automate the creation and patching of malicious CAB files, generate the required DDF files, and serve the payloads via a simple web server (util/server.py). Multiple HTML templates are provided for different obfuscation and delivery strategies, including CAB-less and RAR-based variants. Test payloads (calc.js, calc.vbs, calc.hta, job-jscript.wsf, job-vbs.wsf) demonstrate code execution. The exploit is highly configurable, allowing the attacker to specify the payload, hosting URL, and output format. The structure is modular, with clear separation between payload generation, document crafting, and hosting. This is a mature, weaponized exploit toolkit targeting unpatched Microsoft Office installations on Windows, capable of delivering arbitrary code execution via document-based attack vectors.

MRacumenDisclosed Dec 28, 2021pythonjavascriptnetworkdocumentbrowser
CVE-2021-40444_EXP_JSMaturityPoCVerified exploit

This repository contains a single JavaScript file, 'loader.js', which implements a browser-based exploit targeting Internet Explorer on Windows systems. The exploit leverages ActiveX objects and the 'htmlfile' COM object to create a controlled environment, then attempts to download a remote CAB file ('http://hidusi.com/e8c76295a5f9acb7/ministry.cab') and instantiate it via an embedded object element. The script manipulates the DOM and uses various file paths (e.g., 'AppData/Local/Temp/Low/championship.inf') that suggest attempts to drop or interact with files on the victim's system. The exploit is operational and could lead to remote code execution if run in a vulnerable environment. The code is not part of a known exploit framework and is written in JavaScript, designed to be executed in a browser context with ActiveX enabled.

bambooqjDisclosed Sep 9, 2021javascriptbrowser
Microsoft-Office-Word-MSHTML-Remote-Code-Execution-ExploitMaturityPoCFrameworkmetasploitVerified exploit

This repository contains a Metasploit module (Microsoft-Office-Word-MSHTML_Exploit.rb) that exploits CVE-2021-40444, a remote code execution vulnerability in Microsoft Office Word's handling of MSHTML (browser rendering engine) via malicious ActiveX controls. The module generates a malicious DOCX file ('msf.docx') that, when opened on a vulnerable Windows system, triggers code execution by loading further payloads from an attacker-controlled HTTP(S) server. The exploit leverages both file format and network attack vectors: the initial infection vector is the crafted DOCX file, and subsequent payloads (HTML, CAB, DLL) are served over HTTP/HTTPS. The module allows for payload customization using Metasploit's payload system, making it weaponized and suitable for red teaming or penetration testing. The repository structure is simple, with the main exploit logic in the Ruby file and a brief README describing its purpose.

34zYDisclosed Dec 19, 2021rubyfileformatnetwork
CaboomMaturityPoCVerified exploit

The repository 'Caboom' is a C# project designed to generate malicious .cab files for exploiting CVE-2021-40444, a Microsoft MSHTML remote code execution vulnerability. The main logic resides in 'Program.cs', which takes a user-supplied .dll or .inf file, uses CABARC.EXE to package it into a .cab archive, and then modifies specific bytes in the resulting file to create a final payload ('finalPayload.cab'). This crafted .cab file can be used in further exploitation scenarios, such as embedding in Office documents to trigger the vulnerability. The repository includes Visual Studio project files, configuration files, and build artifacts, but the core exploit logic is in 'Program.cs'. The tool is intended for penetration testers and red teamers, as stated in the README, and is not a detection script. No network endpoints are present; the attack vector is local file manipulation for subsequent use in remote attacks.

mansk1esDisclosed Sep 11, 2021csharplocal
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 CorporationWindows 10 1507operating_system
Microsoft CorporationWindows 10 1607operating_system
Microsoft CorporationWindows 10 1809operating_system
Microsoft CorporationWindows 10 1909operating_system
Microsoft CorporationWindows 10 2004operating_system
Microsoft CorporationWindows 10 20h2operating_system
Microsoft CorporationWindows 10 21h1operating_system
Microsoft CorporationWindows 7operating_system
Microsoft CorporationWindows 8.1operating_system
Microsoft CorporationWindows Rt 8.1operating_system
Microsoft CorporationWindows Server 2004operating_system
Microsoft CorporationWindows Server 2008operating_system
Microsoft CorporationWindows Server 2008 R2operating_system
Microsoft CorporationWindows Server 2008 Sp2operating_system
Microsoft CorporationWindows Server 2012operating_system
Microsoft CorporationWindows Server 2012 R2operating_system
Microsoft CorporationWindows Server 2016operating_system
Microsoft CorporationWindows Server 2019operating_system
Microsoft CorporationWindows Server 2022operating_system
Microsoft CorporationWindows Server 20h2operating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

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, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence11

Every observed campaign linking this CVE to a named adversary.

Associated malware22

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity2

Community discussion across Reddit, Mastodon, and other social sources.

Microsoft MSHTML Remote Code Execution Vulnerability (CVE-2021-40444) | Mallory