Windows AFD.sys CVE-2026-20831
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-privileged local code execution
-
DeliveryIssue concurrent WinSock/afd.sys operations
-
ExploitFlip resource state to win TOCTOU race
-
ExecutionKernel acts on attacker-controlled data
-
ImpactElevate to SYSTEM
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2021 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
|
| Exploitation Conditions | The attacker must already have local, authenticated access with low privileges (PR:L) and the ability to execute code on the target - this is a post-compromise escalation, not a remote entry point. Exploitation further depends on reliably winning the time-of-check-to-time-of-use race in afd.sys, which the CVSS AC:H rating flags as a meaningful limiter: the window is narrow and success is probabilistic, typically requiring multi-threaded, repeated attempts. No user interaction is required (UI:N) and no special non-default Windows configuration is needed since afd.sys is present and reachable on default installations, but the practical bar is the timing reliability plus needing an existing local account/process on the machine. |
| Impact | The signals are consistent and point to a real-but-not-urgent local EoP. The CVSS 3.1 vector (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H, base 7.0) requires local access and already-held low privileges, and importantly rates attack complexity High - reflecting the inherent unreliability of winning a TOCTOU race - while granting full C/I/A impact (SYSTEM) on success. EPSS is 0.03% (6th percentile) and there is no KEV listing and no identified public POC, so this is not a mass-exploitation candidate. There is no material conflict in the data: a low EPSS and High-complexity local race align, and the Microsoft-assigned CVSS matches the description. One minor inconsistency to note: the input Tags include 'Information Disclosure', but the description and CWE-367 describe privilege elevation - treat the primary impact as local EoP and verify the disclosure angle against the MSRC advisory. Prioritize as a routine but important Patch-Tuesday kernel EoP: high value to an attacker for post-compromise escalation, low likelihood of opportunistic mass use. |
| Exploit ScenarioDerived | An attacker who already has a foothold as a standard user - for example via phishing, a compromised service account, or a low-privileged web/app process - runs a purpose-built program that repeatedly issues WinSock/afd.sys operations while a second thread flips the underlying resource state to win the check-to-use race. On a successful race, the kernel acts on attacker-controlled data and the attacker gains SYSTEM, enabling credential theft, tampering, and persistence. No public exploit code has been identified, and the High attack complexity means many attempts may be needed to hit the timing window. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Jul 30, 2026
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.
Earlier versions of this analysis (1)
Time-of-check time-of-use (toctou) race condition in Windows Ancillary Function Driver for WinSock allows an authorized attacker to elevate privileges locally. [CVSS 7.8 HIGH]
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.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 16 packages in microsoft
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Windows 10 1607 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity 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
3DescriptionNVD
Time-of-check time-of-use (toctou) race condition in Windows Ancillary Function Driver for WinSock allows an authorized attacker to elevate privileges locally.
Executive ViewAI
A local privilege escalation vulnerability in Windows Ancillary Function Driver (afd.sys) affects Windows 10, 11, and Server versions 2008-2025 across your entire Windows estate, enabling low-privileged users or attackers with initial local access to gain full SYSTEM control. Current exploitation risk is minimal (0.03% EPSS, no active exploitation reported), but the vulnerability's presence across all Windows deployments and its complete system compromise potential warrant expedited patching.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)NVD
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
NVD
CVE.org
EPSS
VulDB
GitHub PoC
Exploit-DB