Vulnerabilities/CVE-2025-21418, published 11 February 2025

CVE-2025-21418: Windows Ancillary Function Driver for WinSock heap overflow privilege escalation

Microsoft, Windows 10 1607

The Windows Ancillary Function Driver for WinSock (afd.sys) contains a heap-based buffer overflow that allows a local user to elevate privileges. Microsoft rates it 7.8 HIGH, and CISA added it to the Known Exploited Vulnerabilities catalog on the publication date, so it is being used in the wild.

  • 7.8 CVSS 3.1 High
  • CISA KEV since 11 Feb 2025
  • EPSS 2.1%, top 17.2%
  • CWE-122, Heap-based buffer overflow

Description

Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

High priorityIt is a locally exploitable privilege escalation flaw with confirmed in-the-wild exploitation per CISA KEV, though it requires local access and low privileges rather than being remotely reachable.

What it is

The Windows Ancillary Function Driver for WinSock (afd.sys) contains a heap-based buffer overflow that allows a local user to elevate privileges. Microsoft rates it 7.8 HIGH, and CISA added it to the Known Exploited Vulnerabilities catalog on the publication date, so it is being used in the wild.

Impact

A local attacker who triggers the overflow can execute code with higher privileges, up to SYSTEM, giving full control of the affected host.

Attack surface

The CVSS vector is local (AV:L) with low privileges required (PR:L) and no user interaction (UI:N), so any logged-on user who can reach the WinSock driver interface can attempt it. No remote or network path is described in the record.

Exploitation

CISA added it to KEV on 2025-02-11 with a remediation due date of 2025-03-04, confirming known exploitation; EPSS is 0.01568 (74th percentile), which is modest but consistent with a locally exploited, targeted flaw. No ransomware campaign use is documented.

What to do

  • Apply the Microsoft February 2025 security update for all listed Windows client and server versions immediately, prioritizing internet-facing and multi-user systems.
  • Restrict interactive logon and local privilege assignment to only users who need it, reducing the pool of accounts that can reach the driver.
  • Enable and monitor Windows Defender and EDR detections for local privilege escalation behavior on afd.sys.
  • If patching cannot be completed by the KEV due date, follow CISA guidance to apply vendor mitigations or discontinue use of the affected product.

Detection

  • Alert on unexpected processes loading or interacting with afd.sys outside normal WinSock activity.
  • Monitor for processes that spawn with SYSTEM integrity from a non-system parent, especially shortly after a user logon.
  • Correlate local privilege escalation telemetry with known post-exploitation tooling behavior on endpoints.
  • Track patch state of the listed Windows builds against the KEV due date of 2025-03-04.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2025-21418 to the Known Exploited Vulnerabilities catalog on 11 February 2025 as "Microsoft Windows Ancillary Function Driver for WinSock Heap-Based Buffer Overflow Vulnerability". Required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable. Federal deadline 4 March 2025.

Affected products

14 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2025-21418 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2017-8543Windows Search memory handling flaw allows remote code executionWindows Search fails to properly handle objects in memory, allowing an unauthenticated remote attacker to execute code on affected Windows systems. T…KEVEPSS 74%analysed8.8CVE-2023-21674Windows ALPC use-after-free privilege escalationCVE-2023-21674 is a use-after-free (CWE-416) in the Windows Advanced Local Procedure Call (ALPC) subsystem that allows elevation of privilege. It aff…KEVEPSS 34%analysed8.8CVE-2022-41128Windows Scripting Languages out-of-bounds write allows remote code executionCVE-2022-41128 is an out-of-bounds write (CWE-787) in Windows Scripting Languages that leads to remote code execution. Microsoft rates it 8.8 HIGH wi…KEVEPSS 25%analysed8.8CVE-2022-26923Microsoft Active Directory Domain Services certificate validation privilege escalationActive Directory Domain Services fails to properly validate certificate attributes, allowing a low-privileged domain user to obtain a certificate tha…KEVEPSS 84%analysed8.8CVE-2021-40444Microsoft MSHTML remote code execution via malicious Office documentCVE-2021-40444 is a remote code execution flaw in the MSHTML browser rendering engine on Microsoft Windows. An attacker can embed a malicious ActiveX…KEVEPSS 98%analysed8.8CVE-2021-34527Windows Print Spooler privileged file operation RCE (PrintNightmare)The Windows Print Spooler service improperly performs privileged file operations, allowing an attacker to execute arbitrary code as SYSTEM. This is t…KEVEPSS 100%analysed8.8CVE-2020-1020Windows Adobe Type Manager Library font parsing out-of-bounds write RCEMicrosoft Windows Adobe Type Manager Library mishandles a specially crafted multi-master font in Adobe Type 1 PostScript format, causing an out-of-bo…KEVEPSS 65%analysed8.8CVE-2019-0903Windows GDI memory handling remote code executionWindows Graphics Device Interface (GDI) mishandles objects in memory, allowing remote code execution. The record gives no root-cause detail beyond th…KEVEPSS 22%analysed

Source: NIST National Vulnerability Database (record CVE-2025-21418), CISA KEV, FIRST EPSS (scores of 2026-12-05). This page is refreshed as NVD updates the record.