CyberSecBulletin
CVE-2021-40444Exploited in the wildNVD status: Analyzed

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.

Patch now

Attackers are already exploiting this vulnerability, according to CISA.

What to do

  1. Update Windows 10 Version 1507 to 10.0.10240.19060 or a later version.
  2. Update Windows 10 Version 1607 to 10.0.14393.4651 or a later version.
  3. Update Windows 10 Version 1809 to 10.0.17763.2183 or a later version.
  4. CISA's required action: Apply updates per vendor instructions.
  5. Read the advisory on msrc.microsoft.com for workarounds and exact fixed builds.
  6. 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

VendorProductAffected versionsFixed in
MicrosoftWindows 10 Version 150710.0.10240.0 up to, but not including, 10.0.10240.1906010.0.10240.19060
MicrosoftWindows 10 Version 160710.0.14393.0 up to, but not including, 10.0.14393.465110.0.14393.4651
MicrosoftWindows 10 Version 180910.0.17763.0 up to, but not including, 10.0.17763.2183; 10.0.0 up to, but not including, 10.0.17763.218310.0.17763.2183
MicrosoftWindows 10 Version 190910.0.0 up to, but not including, 10.0.18363.180110.0.18363.1801
MicrosoftWindows 10 Version 200410.0.0 up to, but not including, 10.0.19041.123710.0.19041.1237
MicrosoftWindows 10 Version 20H210.0.0 up to, but not including, 10.0.19042.123710.0.19042.1237
MicrosoftWindows 10 Version 21H110.0.0 up to, but not including, 10.0.19043.123710.0.19043.1237
MicrosoftWindows 76.1.0 up to, but not including, 6.1.7601.257126.1.7601.25712
MicrosoftWindows 7 Service Pack 16.1.0 up to, but not including, 6.1.7601.257126.1.7601.25712
MicrosoftWindows 8.16.3.0 up to, but not including, 6.3.9600.201206.3.9600.20120
MicrosoftWindows Server 2008 R2 Service Pack 16.1.7601.0 up to, but not including, 6.1.7601.257126.1.7601.25712
MicrosoftWindows Server 2008 R2 Service Pack 1 (Server Core installation)6.1.7601.0 up to, but not including, 6.1.7601.257126.1.7601.25712
MicrosoftWindows Server 2008 Service Pack 26.0.6003.0 up to, but not including, 6.0.6003.212186.0.6003.21218
MicrosoftWindows Server 2008 Service Pack 2 (Server Core installation)6.0.6003.0 up to, but not including, 6.0.6003.212186.0.6003.21218
MicrosoftWindows Server 20126.2.9200.0 up to, but not including, 6.2.9200.234626.2.9200.23462
MicrosoftWindows Server 2012 (Server Core installation)6.2.9200.0 up to, but not including, 6.2.9200.234626.2.9200.23462
MicrosoftWindows Server 2012 R26.3.9600.0 up to, but not including, 6.3.9600.201206.3.9600.20120
MicrosoftWindows Server 2012 R2 (Server Core installation)6.3.9600.0 up to, but not including, 6.3.9600.201206.3.9600.20120
MicrosoftWindows Server 201610.0.14393.0 up to, but not including, 10.0.14393.465110.0.14393.4651
MicrosoftWindows Server 2016 (Server Core installation)10.0.14393.0 up to, but not including, 10.0.14393.465110.0.14393.4651
MicrosoftWindows Server 201910.0.17763.0 up to, but not including, 10.0.17763.218310.0.17763.2183
MicrosoftWindows Server 2019 (Server Core installation)10.0.17763.0 up to, but not including, 10.0.17763.218310.0.17763.2183
MicrosoftWindows Server 202210.0.20348.0 up to, but not including, 10.0.20348.23010.0.20348.230
MicrosoftWindows Server version 200410.0.0 up to, but not including, 10.0.19041.123710.0.19041.1237
MicrosoftWindows Server version 20H210.0.0 up to, but not including, 10.0.19042.123710.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 systemScoreSeverityScored by
CVSS 3.18.8HighCNA (microsoft.com)
CVSS 3.17.8HighNVD
CVSS 2.06.8MediumNVD

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

  1. CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
  2. CVE record published.
  3. Added to CISA's Known Exploited Vulnerabilities catalogue.
  4. Deadline for US federal agencies to remediate, set by CISA.
  5. Record last changed materially (score, affected products, status or references).

References

Technical write-ups (may include proof of concept)

Other vulnerabilities in Windows 10 Version 1507

All Windows 10 Version 1507 vulnerabilities

Recent Improper Limitation of a Pathname to a Restricted Directory vulnerabilities

Spotted an error? Tell us.