CVE-2023-21768
High · 7.8CVSS
7.8
EPSS
65.4%
Published
Jan 10, 2023
CISA due date
—
Cloudanix analysis
An attacker who already gets basic access to a vulnerable Windows computer can use this flaw to take full control of it.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Privilege Escalation
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
This is a local elevation-of-privilege vulnerability in the Windows Ancillary Function Driver for WinSock, a kernel-mode networking component exposed to local processes. An attacker who already has low-privileged code execution on a vulnerable Windows system can interact with the affected driver to trigger unsafe kernel behavior and gain elevated, typically SYSTEM-level, privileges. Because the CVSS vector is local, low-complexity, requires low privileges, and requires no user interaction, the flaw is most useful as a post-compromise privilege escalation primitive rather than an initial remote entry point.
Why it matters to the business
Successful exploitation can turn an initial low-privilege compromise into full control of a Windows host, enabling credential theft, security tool tampering, lateral movement, data access, and ransomware deployment. The high EPSS score and weaponized exploit maturity indicate meaningful real-world exploitation risk even though this record is not marked as CISA KEV. Systems that expose unpatched Windows endpoints or servers to standard users, contractors, malware, or compromised accounts should treat remediation as high priority.
How an attack unfolds
An attacker first obtains local code execution through phishing, stolen credentials, exploitation of another application, malicious document execution, or malware already running as a standard user. From that foothold, the attacker runs an exploit that communicates with the Windows Ancillary Function Driver for WinSock through normal local driver interfaces. The exploit abuses the vulnerable kernel behavior to corrupt or manipulate privileged execution state and elevate the attacker-controlled process or payload to SYSTEM-level privileges. Once elevated, the attacker can dump credentials, disable defenses, install persistence, access protected data, move laterally, or deploy additional malware. This vulnerability does not normally provide initial remote access by itself; it amplifies the impact of a prior compromise.
How to fix it
Apply the applicable Microsoft security updates for CVE-2023-21768 and ensure Windows hosts are updated to a patched build released in January 2023 or later for the affected supported operating system versions. Prioritize endpoints and servers where untrusted or standard users can execute code, shared systems, jump hosts, VDI images, build workers, and internet-facing servers that could be compromised through a separate bug. Reboot systems after patching if required so the updated kernel driver is loaded. If using vulnerability-management data that maps this finding to onekey-sec/ubi_reader, the supplied fixed Git commit is d5d68e6b1b9f7070c29df5f67fc060f579ae9139; validate that this package mapping is applicable because the vulnerability description itself refers to the Windows AFD kernel driver. Where immediate patching is not possible, reduce exposure by restricting local code execution, removing unnecessary local users, enforcing application control, limiting interactive logons, hardening endpoint protection, and monitoring for privilege-escalation behavior.
How to confirm the fix worked
Confirm the operating system has the relevant Microsoft cumulative/security update installed and that the running afd.sys driver version corresponds to a patched Windows build. Validate with enterprise patch inventory, vulnerability scanners, Windows Update history, and file-version checks for C:\Windows\System32\drivers\afd.sys. Reboot validation is important because kernel drivers may remain loaded until restart. For package-based inventories referencing onekey-sec/ubi_reader, confirm the checked-out version includes commit d5d68e6b1b9f7070c29df5f67fc060f579ae9139 or a later revision, but reconcile this against the Windows-driver nature of the CVE before closing the finding. Retest with authenticated scanning after patching and ensure no vulnerable Windows builds remain in golden images, snapshots, or offline templates.
Typical attack path
- Gain low-privileged local execution on a vulnerable Windows system through phishing, malware, stolen credentials, or another vulnerability.
- Identify the operating system build and confirm the vulnerable AFD for WinSock driver is present.
- Run a weaponized local privilege-escalation exploit targeting the Ancillary Function Driver for WinSock.
- Spawn or migrate into a high-privilege process, commonly SYSTEM-level context.
- Disable or evade security controls and collect credentials or tokens.
- Use elevated access for persistence, lateral movement, data theft, or ransomware staging.
How to detect it
Look for evidence of post-exploitation rather than a single definitive network indicator, because this is a local kernel privilege-escalation vulnerability. Relevant telemetry includes Windows Security logs, Sysmon, EDR process and module telemetry, service-control events, driver/file version inventory, PowerShell logs, command-line logging, and endpoint alerts. Hunt for low-privileged users spawning processes that quickly become SYSTEM, unexpected child processes launched from user-writable directories, suspicious service creation, credential-access tooling after a privilege change, attempts to disable security tools, and unusual access to the AFD device or afd.sys by unknown binaries. Useful Windows events include process creation events, Security 4688, service installation events such as System 7045, privilege assignment/use events such as 4672, logon events 4624, and security-control tampering events from Defender or EDR. Because public exploit-specific strings are not reliably available from the provided data, treat afd.sys and AFD device references as hunting pivots, not standalone proof of compromise.
- C:\Windows\System32\drivers\afd.sys
- afd.sys
- \\Device\\Afd
- Microsoft-Windows-Security-Auditing:4688
- Microsoft-Windows-Security-Auditing:4672
- Microsoft-Windows-Security-Auditing:4624
- Service Control Manager:7045
- NT AUTHORITY\\SYSTEM
What your security team should do
- Prioritize patching vulnerable Windows systems because exploit maturity is weaponized and EPSS is high.
- Patch or replace golden images, VDI templates, server images, and offline recovery images so newly provisioned systems are not reintroduced vulnerable.
- Hunt for signs of local privilege escalation followed by SYSTEM-level activity from unusual user-writable paths.
- Correlate suspicious process creation, token privilege changes, service creation, driver-loading events, credential-dumping attempts, and endpoint-defense tampering around the same host and user session.
- Restrict local administrator rights and interactive logon permissions to reduce the value of privilege-escalation exploits.
- Use application control or EDR blocking to prevent execution from temporary directories, downloads folders, and other user-writable paths.
- Review any vulnerability-management records that associate this CVE with onekey-sec/ubi_reader, because the provided affected-product metadata appears inconsistent with the Windows AFD driver description.
The record
Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|