A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2023-21768

CVE-2023-21768: Windows 11 Privilege Escalation Vulnerability

CVE-2023-21768 is a privilege escalation vulnerability in Windows 11 Ancillary Function Driver for WinSock that allows attackers to gain elevated system privileges. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: May 15, 2026

CVE-2023-21768 Overview

CVE-2023-21768 is an elevation of privilege vulnerability in the Windows Ancillary Function Driver for WinSock (afd.sys). The flaw allows a local, authenticated attacker to gain SYSTEM-level privileges on affected Windows 11 and Windows Server 2022 systems. Microsoft addressed this issue in the January 2023 Patch Tuesday release.

The vulnerability is associated with [CWE-822: Untrusted Pointer Dereference], reflecting improper handling of user-supplied pointers within a kernel driver. Public exploit code targeting this issue circulated shortly after disclosure, and the EPSS score of 74.422% (98.872 percentile) indicates a high likelihood of exploitation activity.

Critical Impact

Local attackers with low-privileged access can escalate to SYSTEM by leveraging an arbitrary kernel write primitive in afd.sys, leading to full host compromise.

Affected Products

  • Microsoft Windows 11 (21H2 and 22H2, x64 and ARM64)
  • Microsoft Windows Server 2022
  • Windows Ancillary Function Driver for WinSock (afd.sys)

Discovery Timeline

  • 2023-01-10 - CVE-2023-21768 published to NVD and addressed in Microsoft's January 2023 security updates
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-21768

Vulnerability Analysis

The vulnerability resides in afd.sys, the kernel-mode driver that backs the Windows Sockets (WinSock) interface. The driver processes I/O Request Packets (IRPs) issued by user-mode applications when interacting with sockets. During the handling of a specific AFD IOCTL, the driver dereferences a user-controlled pointer without validating that it resides in user-mode memory.

An attacker who controls the input buffer can supply a kernel-mode address. The driver subsequently writes attacker-influenced data to that address, producing an arbitrary kernel write primitive. Combined with token replacement or process structure manipulation, this primitive yields privilege escalation to SYSTEM.

The issue requires only local access and low privileges. It does not require user interaction, and exploitation impacts confidentiality, integrity, and availability of the host.

Root Cause

The root cause is an untrusted pointer dereference [CWE-822] within an afd.sys IOCTL handler. The driver fails to validate that the destination pointer provided by the caller is a user-mode address before issuing a write. Calling ProbeForWrite or equivalent validation routines would have prevented the kernel from writing to attacker-chosen kernel addresses.

Attack Vector

Exploitation requires local code execution in the context of any authenticated user. The attacker opens a handle to the AFD device (\Device\Afd), constructs a malformed input structure containing a kernel-mode target address, and issues a DeviceIoControl call. The driver then writes a controlled value to that address. Public proof-of-concept code demonstrates targeting the Token field of the EPROCESS structure or the PreviousMode byte of the attacker's KTHREAD to elevate privileges.

No verified exploit code is reproduced here. Refer to the Microsoft CVE-2023-21768 Update for vendor guidance and patch details.

Detection Methods for CVE-2023-21768

Indicators of Compromise

  • Unexpected child processes of low-privileged users running with SYSTEM integrity, particularly cmd.exe, powershell.exe, or unsigned binaries.
  • Process handles opened to \Device\Afd followed by abnormal NtDeviceIoControlFile calls from non-network applications.
  • Modification of process token fields, including duplicated SYSTEM tokens appearing in user-launched processes.

Detection Strategies

  • Monitor for token manipulation patterns where a non-elevated process suddenly acquires a SYSTEM token, a hallmark of token-stealing exploits built on kernel write primitives.
  • Hunt for processes that open \Device\Afd outside of expected networking applications and issue uncommon IOCTL codes.
  • Correlate Sysmon Event ID 1 (process creation) with Event ID 10 (process access) to surface privilege escalation chains from standard user contexts.

Monitoring Recommendations

  • Enable Windows Defender Exploit Guard and kernel-mode code integrity (HVCI) where supported to constrain post-exploitation behavior.
  • Forward Sysmon, Windows Security, and EDR telemetry to a central data lake and alert on parent-child mismatches indicating privilege jumps.
  • Track patch compliance for the January 2023 Windows cumulative updates across all Windows 11 and Server 2022 endpoints.

How to Mitigate CVE-2023-21768

Immediate Actions Required

  • Apply the January 2023 Windows security updates from Microsoft to all affected Windows 11 21H2, 22H2, and Windows Server 2022 systems.
  • Audit endpoint inventories to identify hosts missing the cumulative update and prioritize remediation on multi-user systems, terminal servers, and developer workstations.
  • Restrict local logon rights and remove unnecessary interactive access for standard users to reduce the local attack surface.

Patch Information

Microsoft released fixes through the January 10, 2023 cumulative updates. Consult the Microsoft CVE-2023-21768 Update advisory for KB numbers corresponding to each affected build. Installing the cumulative update replaces the vulnerable afd.sys driver with a version that validates user-supplied pointers.

Workarounds

  • No supported workaround exists that disables afd.sys without breaking Windows networking; patching is the only complete remediation.
  • Enforce application allowlisting via Windows Defender Application Control or AppLocker to block execution of unauthorized binaries that could deliver exploit code.
  • Apply least-privilege policies and limit local administrative groups to reduce blast radius if exploitation occurs prior to patching.
bash
# Verify patch level on Windows hosts (PowerShell)
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10

# Confirm afd.sys file version post-patch
Get-Item C:\Windows\System32\drivers\afd.sys | Select-Object VersionInfo

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechWindows

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability74.42%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-822

  • NVD-CWE-noinfo
  • Technical References
  • Microsoft CVE-2023-21768 Update
  • Related CVEs
  • CVE-2026-41088: Windows 10 21h2 Privilege Escalation Flaw

  • CVE-2026-41095: Windows Server 2012 Privilege Escalation

  • CVE-2026-40382: Windows 10 1607 Privilege Escalation Flaw

  • CVE-2026-40397: Windows 10 1607 Privilege Escalation Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English