Windows AFD.sys CVE-2026-20831
HIGHSeverity by source
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Local low-privileged attacker (AV:L/PR:L) must win a narrow TOCTOU race (AC:H); success yields SYSTEM, giving full C/I/A on the same host (S:U).
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionNVD
Time-of-check time-of-use (toctou) race condition in Windows Ancillary Function Driver for WinSock allows an authorized attacker to elevate privileges locally.
AnalysisAI
Local privilege escalation in the Windows Ancillary Function Driver for WinSock (afd.sys) lets an authorized low-privileged user win a time-of-check-to-time-of-use race to elevate to SYSTEM across a broad range of Windows client and server releases (Windows 10 1607 through Windows 11 25H2, Server 2008 SP2 through Server 2025). Exploitation requires local code execution and reliably winning a narrow timing window, and no public exploit has been identified at time of analysis. EPSS is very low (0.03%, 6th percentile) and the CVE is not in CISA KEV, indicating no evidence of active exploitation.
Technical ContextAI
The Ancillary Function Driver for WinSock (afd.sys) is the kernel-mode transport component that backs the user-mode Winsock API, mediating socket operations for essentially every network-using process on Windows; because it is reachable from unprivileged user context and runs in kernel space, it is a recurring local-privilege-escalation target. This issue is a CWE-367 time-of-check-time-of-use race condition: the driver validates a resource or buffer state and then acts on it, but an attacker running a concurrent thread can mutate that state in the interval between the check and the use, causing the kernel to operate on attacker-controlled or inconsistent data. The CPE set confirms the flaw is in the OS kernel component (cpe:2.3:o:microsoft:...) rather than an application, spanning x86 and x64 Windows 10/11 and Windows Server builds.
RemediationAI
Apply the Microsoft security update for the affected build; a patch is available from the vendor and the fixed KB numbers per Windows release are listed in the MSRC advisory at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-20831 (exact patched version was not provided in the input and should be taken from that advisory for your specific build). No official workaround is documented; because exploitation requires local code execution as an authenticated user, the most effective compensating control until patching is to limit who can run code on affected hosts - enforce least privilege, restrict interactive and remote logon rights, and apply application allowlisting (e.g. WDAC/AppLocker) to block untrusted binaries, accepting the operational overhead of maintaining allowlists. These controls reduce, but do not eliminate, the local attack surface, so patching remains the primary fix.
More in Windows 10 1607
View allWindows MSHTML component contains a remote code execution vulnerability that allows attackers to craft malicious ActiveX
<p>A remote code execution vulnerability exists when the Windows Print Spooler service improperly performs privileged fi
Windows MSDT (Microsoft Support Diagnostic Tool) allows remote code execution when called via the ms-msdt URL protocol f
The SMBv1 server in Microsoft Windows Vista SP2; Windows Server 2008 SP2 and R2 SP1; Windows 7 SP1; Windows 8.1; Windows
The Windows VBScript engine contains a remote code execution vulnerability in object handling that allows full system co
Windows Print Spooler Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no auth
The Win32k kernel-mode driver in Windows Vista through Windows Server 2016 allows local privilege escalation, exploited
Windows Search Remote Code Execution Vulnerability. Rated high severity (CVSS 7.5), this vulnerability is remotely explo
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Windows Kernel contains a TOCTOU race condition vulnerability allowing local privilege escalation, exploited by the OilR
An elevation of privilege vulnerability exists in Windows when the Win32k component fails to properly handle objects in
An elevation of privilege vulnerability exists in Windows when the Win32k component fails to properly handle objects in
Same technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today