The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-31166

CVE-2021-31166: Windows 10 2004 HTTP Stack RCE Flaw

CVE-2021-31166 is a remote code execution vulnerability in the HTTP Protocol Stack of Microsoft Windows 10 2004 that allows attackers to execute arbitrary code remotely. This article covers technical details, affected systems, and mitigation.

Published: February 25, 2026

CVE-2021-31166 Overview

CVE-2021-31166 is a critical remote code execution vulnerability in the Windows HTTP Protocol Stack (HTTP.sys), the kernel-mode driver responsible for processing HTTP requests on Windows systems. This vulnerability allows an unauthenticated attacker to execute arbitrary code at the kernel level by sending specially crafted HTTP packets to a vulnerable system. The vulnerability is classified as a Use After Free (CWE-416) memory corruption flaw that can be exploited remotely without any user interaction.

Critical Impact

This vulnerability enables unauthenticated remote code execution with kernel-level privileges. It is wormable, meaning it can spread automatically across networks without user interaction. CISA has added this vulnerability to its Known Exploited Vulnerabilities catalog due to active exploitation in the wild.

Affected Products

  • Microsoft Windows 10 version 2004
  • Microsoft Windows 10 version 20H2
  • Microsoft Windows Server version 2004
  • Microsoft Windows Server version 20H2

Discovery Timeline

  • 2021-05-11 - CVE-2021-31166 published to NVD
  • 2025-10-30 - Last updated in NVD database

Technical Details for CVE-2021-31166

Vulnerability Analysis

The vulnerability resides in HTTP.sys, the kernel-mode driver that handles HTTP traffic for Windows services including Internet Information Services (IIS), Windows Remote Management (WinRM), and WSDAPI. The flaw is a Use After Free condition that occurs when the HTTP Protocol Stack improperly handles certain HTTP request headers.

When processing HTTP requests containing malicious trailer headers or specific request sequences, the driver can reference memory that has already been freed. This memory corruption can be leveraged to achieve arbitrary code execution within the kernel context, giving attackers complete control over the affected system.

The attack surface is particularly significant because HTTP.sys operates at the kernel level, meaning successful exploitation bypasses user-mode security controls entirely. Any Windows service that utilizes HTTP.sys for HTTP processing becomes a potential attack vector.

Root Cause

The root cause is a Use After Free (CWE-416) vulnerability in the HTTP Protocol Stack's handling of HTTP request headers. The kernel driver fails to properly track memory allocations during HTTP request processing, leading to a condition where freed memory is subsequently accessed. This type of memory safety issue in kernel-mode code is particularly dangerous as it can lead to complete system compromise.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Identifying a target system running a vulnerable Windows version with HTTP.sys exposed
  2. Sending specially crafted HTTP packets containing malicious header structures
  3. Triggering the Use After Free condition in kernel memory
  4. Achieving arbitrary code execution with SYSTEM privileges

The vulnerability is considered wormable, meaning successful exploitation could be automated to spread across networks without any human intervention. Any service binding to HTTP.sys including IIS web servers, WinRM endpoints, and WSDAPI services can serve as an attack surface.

Detection Methods for CVE-2021-31166

Indicators of Compromise

  • Unexpected system crashes or Blue Screen of Death (BSOD) events with HTTP.sys references in crash dumps
  • Anomalous HTTP traffic patterns with malformed or unusual header structures
  • Windows Event Log entries indicating kernel-mode driver failures in the HTTP subsystem
  • Unexpected process creation or network connections originating from SYSTEM context

Detection Strategies

  • Deploy network intrusion detection signatures to identify malformed HTTP packets targeting the vulnerability
  • Monitor Windows Event Logs for Event ID 4625 (failed authentication) and kernel crash events
  • Implement endpoint detection and response (EDR) solutions to identify anomalous kernel-mode behavior
  • Analyze network traffic for unusual HTTP header patterns, particularly trailer headers

Monitoring Recommendations

  • Enable enhanced Windows kernel auditing to capture driver load and memory events
  • Configure network monitoring to alert on HTTP traffic anomalies to Windows servers
  • Establish baseline metrics for HTTP.sys performance and alert on deviations
  • Monitor CISA KEV catalog updates and threat intelligence feeds for active exploitation campaigns

How to Mitigate CVE-2021-31166

Immediate Actions Required

  • Apply the Microsoft security update for CVE-2021-31166 immediately on all affected systems
  • Prioritize patching internet-facing systems running IIS, WinRM, or other HTTP.sys-dependent services
  • Implement network segmentation to limit exposure of vulnerable systems
  • Review and restrict unnecessary HTTP-based services on Windows systems

Patch Information

Microsoft has released security updates to address this vulnerability. The official security advisory and patch information is available through the Microsoft Security Response Center advisory for CVE-2021-31166. Organizations should apply the appropriate update for their Windows version immediately due to the critical severity and active exploitation status. Additional technical analysis is available via the Packet Storm RCE Exploit documentation.

Workarounds

  • Disable unnecessary HTTP-based services that utilize HTTP.sys until patching is complete
  • Implement network-level controls (firewalls, WAF) to filter potentially malicious HTTP traffic
  • Use network segmentation to isolate vulnerable Windows servers from untrusted networks
  • Consider disabling HTTP trailer support if not required for business operations
bash
# Verify HTTP.sys service status and consider disabling if not required
sc query http
# Stop HTTP service if not needed (will affect IIS, WinRM, etc.)
sc stop http
# Disable HTTP service to prevent automatic restart
sc config http start= disabled

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechWindows

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability93.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CISA KEV Information
  • In CISA KEVYes
  • CWE References
  • CWE-416
  • Technical References
  • Packet Storm RCE Exploit

  • CISA Known Exploited Vulnerability CVE-2021-31166
  • Vendor Resources
  • Microsoft Security Advisory CVE-2021-31166
  • Related CVEs
  • CVE-2026-31995: Openclaw Command Injection Vulnerability

  • CVE-2026-25190: Windows GDI RCE Vulnerability

  • CVE-2026-25166: Windows System Image Manager RCE Flaw

  • CVE-2026-25173: Windows RRAS RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English