Microsoft MSHTML Remote Code Execution
CVE-2021-40444 is a high-severity improper limitation of a pathname to a restricted directory vulnerability in Windows 10 Version 1507 from Microsoft, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version 10.0.10240.19060 as the first without the flaw, so updating Windows 10 Version 1507 to that release or later removes the exposure. CISA added it to the Known Exploited Vulnerabilities catalogue on November 3, 2021, which means attacks have been observed in the wild, including in ransomware campaigns.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Windows 10 Version 1507 to 10.0.10240.19060 or a later version.
- Update Windows 10 Version 1607 to 10.0.14393.4651 or a later version.
- Update Windows 10 Version 1809 to 10.0.17763.2183 or a later version.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on msrc.microsoft.com for workarounds and exact fixed builds.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Microsoft | Windows 10 Version 1507 | 10.0.10240.0 up to, but not including, 10.0.10240.19060 | 10.0.10240.19060 |
| Microsoft | Windows 10 Version 1607 | 10.0.14393.0 up to, but not including, 10.0.14393.4651 | 10.0.14393.4651 |
| Microsoft | Windows 10 Version 1809 | 10.0.17763.0 up to, but not including, 10.0.17763.2183; 10.0.0 up to, but not including, 10.0.17763.2183 | 10.0.17763.2183 |
| Microsoft | Windows 10 Version 1909 | 10.0.0 up to, but not including, 10.0.18363.1801 | 10.0.18363.1801 |
| Microsoft | Windows 10 Version 2004 | 10.0.0 up to, but not including, 10.0.19041.1237 | 10.0.19041.1237 |
| Microsoft | Windows 10 Version 20H2 | 10.0.0 up to, but not including, 10.0.19042.1237 | 10.0.19042.1237 |
| Microsoft | Windows 10 Version 21H1 | 10.0.0 up to, but not including, 10.0.19043.1237 | 10.0.19043.1237 |
| Microsoft | Windows 7 | 6.1.0 up to, but not including, 6.1.7601.25712 | 6.1.7601.25712 |
| Microsoft | Windows 7 Service Pack 1 | 6.1.0 up to, but not including, 6.1.7601.25712 | 6.1.7601.25712 |
| Microsoft | Windows 8.1 | 6.3.0 up to, but not including, 6.3.9600.20120 | 6.3.9600.20120 |
| Microsoft | Windows Server 2008 R2 Service Pack 1 | 6.1.7601.0 up to, but not including, 6.1.7601.25712 | 6.1.7601.25712 |
| Microsoft | Windows Server 2008 R2 Service Pack 1 (Server Core installation) | 6.1.7601.0 up to, but not including, 6.1.7601.25712 | 6.1.7601.25712 |
| Microsoft | Windows Server 2008 Service Pack 2 | 6.0.6003.0 up to, but not including, 6.0.6003.21218 | 6.0.6003.21218 |
| Microsoft | Windows Server 2008 Service Pack 2 (Server Core installation) | 6.0.6003.0 up to, but not including, 6.0.6003.21218 | 6.0.6003.21218 |
| Microsoft | Windows Server 2012 | 6.2.9200.0 up to, but not including, 6.2.9200.23462 | 6.2.9200.23462 |
| Microsoft | Windows Server 2012 (Server Core installation) | 6.2.9200.0 up to, but not including, 6.2.9200.23462 | 6.2.9200.23462 |
| Microsoft | Windows Server 2012 R2 | 6.3.9600.0 up to, but not including, 6.3.9600.20120 | 6.3.9600.20120 |
| Microsoft | Windows Server 2012 R2 (Server Core installation) | 6.3.9600.0 up to, but not including, 6.3.9600.20120 | 6.3.9600.20120 |
| Microsoft | Windows Server 2016 | 10.0.14393.0 up to, but not including, 10.0.14393.4651 | 10.0.14393.4651 |
| Microsoft | Windows Server 2016 (Server Core installation) | 10.0.14393.0 up to, but not including, 10.0.14393.4651 | 10.0.14393.4651 |
| Microsoft | Windows Server 2019 | 10.0.17763.0 up to, but not including, 10.0.17763.2183 | 10.0.17763.2183 |
| Microsoft | Windows Server 2019 (Server Core installation) | 10.0.17763.0 up to, but not including, 10.0.17763.2183 | 10.0.17763.2183 |
| Microsoft | Windows Server 2022 | 10.0.20348.0 up to, but not including, 10.0.20348.230 | 10.0.20348.230 |
| Microsoft | Windows Server version 2004 | 10.0.0 up to, but not including, 10.0.19041.1237 | 10.0.19041.1237 |
| Microsoft | Windows Server version 20H2 | 10.0.0 up to, but not including, 10.0.19042.1237 | 10.0.19042.1237 |
Version data comes from the organisation that assigned the CVE; 11 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.8 | High | CNA (microsoft.com) |
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 2.0 | 6.8 | Medium | NVD |
Official description
Microsoft is investigating reports of a remote code execution vulnerability in MSHTML that affects Microsoft Windows. Microsoft is 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. The attacker would then have to convince the user to open the malicious document. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights. Microsoft Defender Antivirus and Microsoft Defender for Endpoint both provide detection and protections for the known vulnerability. Customers should keep antimalware products up to date. Customers who utilize automatic updates do not need to take additional action. Enterprise customers who manage updates should select the detection build 1.349.22.0 or newer and deploy it across their environments. Microsoft Defender for Endpoint alerts will be displayed as: “Suspicious Cpl File Execution”. Upon completion of this investigation, Microsoft will take the appropriate action to help protect our customers. This may include providing a security update through our monthly release process or providing an out-of-cycle security update, depending on customer needs. Please see the Mitigations and Workaround sections for important information about steps you can take to protect your system from this vulnerability. UPDATE September 14, 2021: Microsoft has released security updates to address this vulnerability. Please see the Security Updates table for the applicable update for your system. We recommend that you install these updates immediately. Please see the FAQ for important information about which updates are applicable to your system.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Limitation of a Pathname to a Restricted Directory
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
How developers prevent this class of flaw
- For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.
More Improper Limitation of a Pathname to a Restricted Directory vulnerabilities (CWE-22)
Timeline
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Advisories
Third-party and government advisories
- packetstormsecurity.com/files/164210/Microsoft-Windows-MSHTML-Overview.htmlThird Party Advisory, VDB Entry
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-40444US Government Resource
Technical write-ups (may include proof of concept)
- packetstormsecurity.com/files/165214/Microsoft-Office-Word-MSHTML-Remote-Code-Execution.htmlExploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/167317/Microsoft-Office-MSDT-Follina-Proof-Of-Concept.htmlExploit, Third Party Advisory, VDB Entry
Other vulnerabilities in Windows 10 Version 1507
- 7.0 High severity
- 7.8 High severity
- 7.0 High severity
- 7.7 High severity
- 7.0 High severity
Recent Improper Limitation of a Pathname to a Restricted Directory vulnerabilities
- 8.8 High severity
SAP NetWeaver Unrestricted File Upload Exploited
- 5.3 Medium severity
- 9.8 Critical severity
Arcadyan Buffalo Firmware Path Traversal Exploited
- 4.9 Medium severity
SonicWall Email Security Path Traversal Exploited
- 7.8 High severity
- 9.8 Critical severity
Spotted an error? Tell us.