CVE-2021-31166: Windows HTTP Protocol Stack Remote Code Execution
- Vendor
- Microsoft Corporation
CVE-2021-31166 is a critical remote code execution vulnerability in the Windows HTTP Protocol Stack affecting Windows 10 and Windows Server releases 2004 and 20H2, including Server Core installations. Improper handling of specially crafted incoming packets by the kernel-mode HTTP driver allows an unauthenticated remote attacker to execute code with SYSTEM privileges. Exposed services can include IIS and other applications using the Windows HTTP Protocol Stack, including Windows Remote Management. The vulnerability has a CVSS score of 9.8 and is considered potentially wormable.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can result in complete system compromise through remote code execution with SYSTEM privileges, or denial of service through system instability or crashes. Its unauthenticated, potentially wormable nature could enable automated propagation between reachable vulnerable systems. Public proof-of-concept code increases the risk to unpatched installations, but does not establish that reliable remote code execution or widespread exploitation has occurred.
Mitigation
If you can’t patch tonight, do this now.
Pending patch deployment, restrict access from untrusted networks to services using the Windows HTTP Protocol Stack, including applicable IIS and Windows Remote Management listeners. Disable unnecessary exposed listeners and use network segmentation to reduce reachability between vulnerable systems. These exposure-reduction measures do not correct the underlying vulnerability.
Remediation
Patch, then assume compromise.
Install the applicable Microsoft cumulative security update released on May 11, 2021, or a subsequent cumulative update containing the fix, on every affected Windows 10 and Windows Server system. Include Server Core installations and systems exposing non-IIS services that use the Windows HTTP Protocol Stack.
Exploits
5 exploits validated by Mallory's analysis. Hidden: 3 rejected by Mallory's analysis as not a working exploit.
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.
References
Frequently asked questions
- Is CVE-2021-31166 exploited in the wild?
- Yes. As of Dec 3, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Apr 6, 2022.
- Is there a public exploit for CVE-2021-31166?
- Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2021-31166, the earliest disclosed May 11, 2021.
- Is there a patch for CVE-2021-31166?
- Install the applicable Microsoft cumulative security update released on May 11, 2021, or a subsequent cumulative update containing the fix, on every affected Windows 10 and Windows Server system. Include Server Core installations and systems exposing non-IIS services that use the Windows HTTP Protocol Stack.
- What products are affected by CVE-2021-31166?
- Microsoft Corporation Windows 10 1809, Microsoft Corporation Windows 10 2004, Microsoft Corporation Windows 10 20h2, Microsoft Corporation Windows Server 2004, and Microsoft Corporation Windows Server 20h2.
- How severe is CVE-2021-31166?
- CVE-2021-31166 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 99.9% (100th percentile) as of Dec 3, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.