CVE-2011-2005: Microsoft Ancillary Function Driver (afd.sys) Improper Input Validation Vulnerability
afd.sys in the Ancillary Function Driver in Microsoft Windows does not properly validate user-mode input passed to kernel mode, which allows local users to gain privileges via a crafted application.
CVE-2011-2005 is a local privilege-escalation vulnerability in the Microsoft Ancillary Function Driver (afd.sys) on Windows. The driver fails to properly validate user-mode input before it is handled in kernel mode, so a local user running a crafted application can obtain elevated privileges. Because afd.sys is a core networking-related kernel component present on typical Windows hosts, successful abuse can turn an ordinary user foothold into SYSTEM-level control and matter for any environment where untrusted or multi-user local access is possible.
Defenders should treat this as a classic kernel input-validation flaw that requires prompt patching per the vendor advisory; specifics of affected builds and exact update packages must be confirmed against that advisory.
How it works
The weakness is catalogued as CWE-264 (Permissions, Privileges, and Access Controls). According to the CISA summary, afd.sys does not properly validate user-mode input that is passed into kernel mode. An attacker who already has the ability to run code as a standard user can supply specially crafted input through the driver’s interfaces. Because the validation is insufficient, that input can cause the kernel-mode driver to perform privileged operations on the attacker’s behalf, resulting in elevation of privileges.
No remote exploitation path is described; the attack requires local execution of a crafted application. Exact call sequences, IOCTL numbers, or memory-corruption details are not provided in the available facts and must not be assumed—consult the vendor advisory for any deeper technical description.
Am I affected? How to find it in your systems
afd.sys ships as part of the Windows networking stack and is present on most client and server installations that use Winsock or related ancillary functions. Inventory every Windows host (workstations, servers, virtual machines, and golden images) and identify the presence of the Ancillary Function Driver.
- Query installed Windows updates and hotfixes against the list published in the Microsoft advisory for CVE-2011-2005; only the vendor’s stated fixed builds are authoritative.
- Confirm the file version and digital signature of %SystemRoot%\System32\drivers\afd.sys on representative systems, then cross-check those values with the advisory.
- Review configuration baselines for any non-standard driver load paths or third-party software that might interact with afd.sys.
- For exploitation signs, examine security and system event logs for unexpected privilege-elevation events, crashes or bugchecks referencing afd.sys, and process-creation telemetry showing untrusted binaries spawning elevated children. Kernel-mode crash dumps that list afd.sys on the stack warrant further investigation. Telemetry alone cannot prove exploitation of this specific CVE; correlate with the presence of unpatched systems.
How to remediate
Apply the security update supplied by Microsoft for CVE-2011-2005 exactly as directed in the vendor advisory. CISA’s required action is simply to apply updates per vendor instructions. After deployment, verify that the updated afd.sys is loaded (reboot if required) and that the file version matches the fixed build listed by Microsoft.
Beyond the patch, harden the host against the broader class of local privilege-escalation flaws:
- Enforce least-privilege user accounts and restrict interactive logon rights on servers.
- Enable and monitor Windows Defender Application Control or equivalent application-allowlisting so that arbitrary crafted binaries cannot run.
- Keep kernel-mode code-integrity and Secure Boot enabled where supported.
- Regularly audit local administrator group membership and remove standing elevated rights.
If you can't patch immediately
Until the vendor update can be installed, reduce the attack surface with compensating controls:
- Segment hosts so that systems still missing the patch cannot be reached by untrusted local users or by lateral-movement paths from lower-trust networks.
- Use host-based firewalls and endpoint detection rules to alert on or block suspicious process behavior that attempts to interact with afd.sys or to elevate privileges.
- Where feasible, disable unnecessary local logon or remote-desktop access for standard users on critical servers.
- Increase monitoring density—forward process-creation, privilege-use, and driver-load events to a SIEM and tune alerts for anomalies involving afd.sys.
- Virtual patching via endpoint protection platforms may offer temporary signatures, but these are not a substitute for the official Microsoft update and should be validated against the vendor guidance.
If your data may have been exposed
Actively exploited local privilege-escalation vulnerabilities are commonly used after an initial foothold to expand access and exfiltrate data, so any confirmed exploitation should be treated as a potential breach. Known ransomware use of this CVE is not documented. If you suspect compromise, follow standard incident-response procedures: isolate affected hosts, preserve forensic evidence, and rotate credentials. As an additional check, you can run a free exposure scan of your email addresses against known breach data sets to determine whether associated accounts have appeared in prior public dumps.
AICompiled with AI assistance from public sources and published under our editorial standards.