What is afd.sys?
The Ancillary Function Driver (afd.sys) is a Windows kernel-mode driver that implements the core functionality of Windows Sockets (Winsock). Every network-connected application on Windows — browsers, email clients, services — routes socket operations through afd.sys. As a kernel driver processing data from user-mode applications, afd.sys is a high-value target: a vulnerability in this component can allow any low-privilege process to escalate to SYSTEM-level privileges by passing malformed data into the kernel.
Overview
CVE-2011-2005 is a local privilege escalation vulnerability in afd.sys. The driver fails to properly validate user-mode input before passing it to kernel mode, allowing a local attacker to craft a malicious application that triggers an out-of-bounds write in kernel memory and gains SYSTEM privileges.
Microsoft patched this vulnerability in Security Bulletin MS11-080 on October 11, 2011.
Affected Versions
| Operating System | Affected |
|---|---|
| Windows XP SP3 | Yes |
| Windows XP x64 Edition SP2 | Yes |
| Windows Server 2003 SP2 (all editions) | Yes |
| Windows Vista SP2 | Yes |
| Windows Server 2008 SP2 | Yes |
| Windows 7 (all editions) | Yes |
| Windows Server 2008 R2 | Yes |
Windows 7 SP1 and Server 2008 R2 SP1 were not affected.
Technical Details
afd.sys accepts ioctl calls from user-mode processes for socket operations. The vulnerability stemmed from insufficient validation of input parameters passed via an ioctl before the data was used in kernel memory operations. By passing specially crafted parameters, a local attacker could cause an out-of-bounds write in kernel address space.
This class of vulnerability — improper input validation at the user-mode/kernel-mode boundary — was a recurring pattern in Windows kernel drivers during this period. Unlike user-mode memory corruption, kernel-mode out-of-bounds writes directly manipulate OS data structures, enabling reliable privilege escalation to SYSTEM without needing to bypass user-mode protections like ASLR or DEP.
Attack prerequisites:
- Local code execution on the target system (any privilege level)
- No special permissions required beyond the ability to run a program
- Reliable exploitation across all affected Windows versions
Discovery
The vulnerability was reported to Microsoft by Luigi Auriemma and Donato Ferrante (Mauro Gentile) of ReVuln, and independently by Tarjei Mandt of Norman — two concurrent discoveries that were coordinated through Microsoft's security response process.
Exploitation Context
CISA confirmed in-the-wild exploitation, adding this CVE to the KEV catalog in March 2022. Local privilege escalation vulnerabilities like this one are commonly used in the second stage of an attack chain: an attacker who has already achieved code execution via an initial access exploit (phishing, browser vulnerability, etc.) uses a kernel LPE to escalate from a limited user context to SYSTEM, enabling persistence, credential dumping, and lateral movement.
Remediation
- Apply MS11-080 (October 2011 Patch Tuesday) on all affected Windows systems
- Windows XP and Server 2003 are now end-of-life — any remaining deployments should be treated as fully compromised and migrated to supported Windows versions
- Apply Defense-in-Depth controls for systems that cannot be immediately updated: application allowlisting, restricted user privileges, and network segmentation
- Monitor for suspicious process privilege escalation via endpoint detection tools (unusual SYSTEM-level processes spawned from user-context parents)
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2011-2005 |
| Vendor / Product | Microsoft — Ancillary Function Driver (afd.sys) |
| NVD Published | 2011-10-12 |
| NVD Last Modified | 2025-10-22 |
| CVSS 3.1 Score | 7.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CISA KEV Added | 2022-03-28 |
| CISA KEV Deadline | 2022-04-18 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2011-10-11 | Microsoft releases MS11-080 patching afd.sys improper input validation |
| 2011-10-12 | CVE-2011-2005 published |
| 2022-03-28 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-04-18 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2011-2005 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Microsoft Security Bulletin MS11-080 | Vendor Advisory |