Wavense
VulnerabilitiesVendorsMy Stack
Wavense© 2026 Wavense. All rights reserved.Privacy PolicyTerms & Conditions
Vulnerabilities/CVE-2021-31166
Vulnerability dossier

CVE-2021-31166

HTTP Protocol Stack Remote Code Execution Vulnerability

VendormicrosoftPublishedMay 11, 2021SourceNVDWeaknessCWE-416
Act now

Actively exploited in the wild. Patch or mitigate immediately — don't wait for a maintenance window.

⚙ WeaponizedMetasploit module availableopen ↗
Severity
Critical · 9.8
CVSS base score
Exploitation
In the wild
CISA KEV · Metasploit
Predicted risk
100% model
EPSS forecast — overtaken by confirmed exploitation
Exposure
Internet-facing
Exploitable remotely, no login, no user action
01

What's the risk?

An unauthenticated attacker, remotely over the network, with no user interaction, can fully compromise the system — steal data, tamper with it and take it offline.

HTTP Protocol Stack Remote Code Execution Vulnerability

How it's exploitedMITRE ATT&CK · 2 observed in the wild
Initial Access
T1190Exploit Public-Facing Applicationobserved
Execution
T1059Command and Scripting Interpreterobserved

Techniques marked “observed” are corroborated by threat intelligence; the rest are inferred from the weakness type (CWE) and attack vector.

02

Who's exploiting it?

Corroborated threat activity referencing this CVE — with source and confidence, not inference.

Confirmed exploited in the wild. CISA KEV · catalogued Apr 6, 2022
Observed techniques MITRE-analysed · CTID Mappings Explorer
T1059Command and Scripting Interpreterobserved
T1190
Exploit Public-Facing Application
observed

These techniques were analysed against this CVE's real-world exploitation — the matching entries in the ATT&CK chain above are marked “observed”.

03

Are we affected?

4
  • Affectedmicrosoft · windows_10_2004all versions
  • Affectedmicrosoft · windows_10_20h2all versions
  • Affectedmicrosoft · windows_server_2004all versions
  • Affectedmicrosoft · windows_server_20h2all versions
04

What to do

Generated by Wavense from the CVE record — an immediate mitigation and the permanent fix.

  1. !

    Mitigate now

    To temporarily reduce risk, block untrusted HTTP/HTTPS traffic at the network perimeter using a firewall. If possible, restrict access to affected web servers from external networks to only trusted IP ranges or VPN connections. Implement robust intrusion detection systems (IDS) and endpoint detection and response (EDR) to monitor for suspicious activity and potential exploitation attempts.

  2. ✓

    Permanent fix

    The permanent resolution is to apply the security updates released by Microsoft for the affected HTTP Protocol Stack (HTTP.sys). Specifically, ensure that all Windows 10 versions 2004, 20H2, and Windows Server 2019 systems are updated with the patches addressing CVE-2021-31166. This update resolves the use-after-free vulnerability, preventing remote code execution.

Technical details— weakness, CVSS vector & calculator, related CVEs

Business impact

Exploitation of this vulnerability allows an unauthenticated, remote attacker to execute arbitrary code with kernel-level privileges on the target system. This can lead to a complete system compromise, enabling attackers to install programs, view, change, or delete data, or create new accounts with full user rights. The business consequences include severe data breaches, service disruption, and potential regulatory fines.

Weakness

1
CWE-416Common Weakness Enumeration · MITRE definition

CVSS 3.1 details

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
0.0
/ 10.0 base
Critical severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Exploitability metrics
Attack VectorAV
Remotely exploitable across a network
Attack ComplexityAC
No special conditions required
Privileges RequiredPR
No authorization needed
User InteractionUI
No user participation needed
Impact metrics
ScopeS
Impact confined to the vulnerable component
ConfidentialityC
Total loss of confidentiality
IntegrityI
Total loss of integrity
AvailabilityA
Total loss of availability

Related vulnerabilities

Other CVEs affecting windows 10 2004

NVD
8.8High
CVE-2023-21674KEV

Windows Advanced Local Procedure Call (ALPC) Elevation of Privilege Vulnerability

microsoftCWE-416Use After FreeLocalLow effortLow privNo interactionCIA
2023-01-10
NVD
8.8High
CVE-2022-41128KEV

Windows Scripting Languages Remote Code Execution Vulnerability

microsoftCWE-787Out-of-bounds WriteNetworkLow effortNo authUser neededCIA
2022-11-09
NVD
8.8High
CVE-2022-26923KEV⚙ WeaponizedExploit likely

Active Directory Domain Services Elevation of Privilege Vulnerability

microsoftCWE-295Improper Certificate ValidationNetworkLow effortLow privNo interactionCIA
2022-05-10
NVD
8.8High
CVE-2021-40444KEV⚙ WeaponizedExploit likely

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.

microsoftCWE-22Path TraversalNetworkLow effortNo authUser neededCIA
2021-09-15
NVD
8.8High
CVE-2021-34527KEV⚙ WeaponizedExploit likely

A remote code execution vulnerability exists when the Windows Print Spooler service improperly performs privileged file operations. An attacker who successfully exploited this vulnerability could run arbitrary code with SYSTEM privileges. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. UPDATE July 7, 2021: The security update for Windows Server 2012, Windows Server 2016 and Windows 10, Version 1607 have been released. Please see the Security Updates table for the applicable update for your system. We recommend that you install these updates immediately. If you are unable to install these updates, see the FAQ and Workaround sections in this CVE for information on how to help protect your system from this vulnerability. In addition to installing the updates, in order to secure your system, you must confirm that the following registry settings are set to 0 (zero) or are not defined (Note: These registry keys do not exist by default, and therefore are already at the secure setting.), also that your Group Policy setting are correct (see FAQ): HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint NoWarningNoElevationOnInstall = 0 (DWORD) or not defined (default setting) UpdatePromptSettings = 0 (DWORD) or not defined (default setting) Having NoWarningNoElevationOnInstall set to 1 makes your system vulnerable by design. UPDATE July 6, 2021: Microsoft has completed the investigation and 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. If you are unable to install these updates, see the FAQ and Workaround sections in this CVE for information on how to help protect your system from this vulnerability. See also KB5005010: Restricting installation of new printer drivers after applying the July 6, 2021 updates. Note that the security updates released on and after July 6, 2021 contain protections for CVE-2021-1675 and the additional remote code execution exploit in the Windows Print Spooler service known as “PrintNightmare”, documented in CVE-2021-34527.

microsoftNetworkLow effortLow privNo interactionCIA
2021-07-02
NVD
8.4High
CVE-2021-33739KEV

Microsoft DWM Core Library Elevation of Privilege Vulnerability

microsoftLocalLow effortNo authNo interactionCIA
2021-06-08
NVD
8.1High
CVE-2022-26925KEV

Windows LSA Spoofing Vulnerability

microsoftCWE-306Missing AuthenticationNetworkHigh effortNo authNo interactionCIA
2022-05-10
NVD
7.8High
CVE-2023-28252KEV⚙ Weaponized

Windows Common Log File System Driver Elevation of Privilege Vulnerability

microsoftCWE-122Heap-based Buffer OverflowLocalLow effortLow privNo interactionCIA
2023-04-11
0.0
/ 10.0 base
Critical severity
Key facts
CVE ID
CVE-2021-31166
Published
May 11, 2021
Last modified
Oct 30, 2025
CVSS
9.8 (v3.1)
EPSS
99.87%
In CISA KEV
Yes
Confidence
100/100
Weakness
CWE-416
Timeline
  1. May 11, 2021Published to NVDNVD
  2. Oct 30, 2025Record last modifiedNVD
  3. Aug 22, 2026AI analysis generatedWavense
View on NVD