CVE-2023-29336 — Microsoft Win32K Privilege Escalation Vulnerability

CVE-2023-29336

Windows Win32k — Use-After-Free SYSTEM Privilege Escalation; May 2023 Patch Tuesday Zero-Day; Discovered by Avast

What is Win32k?

Win32k (win32k.sys) is a Windows kernel-mode driver that implements the core of the Windows graphical subsystem — window management, drawing, user input handling, and the low-level primitives that all GUI applications depend on. Because it runs with kernel privileges and is directly accessible from user-space applications via system calls, Win32k has historically been one of the most exploited components in the Windows kernel. A use-after-free in Win32k allows user-space code to trigger memory corruption in a privileged context, making it a reliable local privilege escalation (LPE) primitive: any user who can run code on a system can potentially escalate to SYSTEM.

Overview

CVE-2023-29336 is a use-after-free (CWE-416) vulnerability in the Windows Win32k kernel driver that allows a local attacker with standard user privileges to escalate to SYSTEM. It was patched in the May 2023 Patch Tuesday and simultaneously added to the CISA KEV catalog on the same day — confirming it was a zero-day under active exploitation at the time Microsoft released the patch. Avast Threat Intelligence discovered the in-the-wild exploitation and reported it to Microsoft.

Affected Versions

Product Affected Fixed
Windows 10 (multiple versions) Yes May 2023 cumulative update
Windows 11 (multiple versions) Yes May 2023 cumulative update
Windows Server 2008 R2 through 2022 Yes May 2023 cumulative update

Technical Details

A use-after-free (CWE-416) occurs when a program continues to use a memory object after it has been freed/deallocated. In the Win32k kernel driver, a flaw in how certain graphical objects or handles are managed allows user-space code to manipulate the kernel's memory allocator to reuse the freed memory — and then trigger the kernel to dereference or operate on the now-recycled memory region in a controlled way.

Exploitation typically follows a predictable pattern for Win32k UAF bugs:

  1. Groom the kernel heap: allocate objects to position attacker-controlled data adjacent to or in the location the freed object occupied.
  2. Trigger the free: cause the vulnerable code path to release the kernel object.
  3. Reallocate: immediately allocate a different object (often a kernel data structure with attacker-controlled content) into the freed memory region.
  4. Trigger the use: cause Win32k to use the freed pointer, now pointing to attacker-controlled data — enabling reads from or writes to arbitrary kernel addresses.
  5. Escalate: overwrite a security token's privilege field or a function pointer to gain SYSTEM-level code execution.

With PR:L (low privilege required), any standard user account with local logon access — including service accounts, limited users, or accounts accessed via lateral movement — can execute this escalation.

Discovery

Avast Threat Intelligence researchers (Jan Vojtěšek, Milánek, and Luigino Camastra) discovered CVE-2023-29336 being actively exploited in the wild and reported it to Microsoft. The simultaneous KEV addition on Patch Tuesday confirms that exploitation was confirmed and ongoing at the time Microsoft released the fix, rather than discovered after the fact.

Exploitation Context

Win32k LPE zero-days are a consistent staple of advanced threat actor toolkits. They are rarely standalone — they serve as the second stage of a multi-step attack: an attacker gains initial code execution at standard user privilege (via phishing, document exploit, or remote service exploitation) and then uses the Win32k UAF to escalate to SYSTEM, enabling credential dumping, lateral movement, and persistence that requires administrative access. The confirmed in-the-wild exploitation at patch time suggests CVE-2023-29336 was part of an active attack chain, likely maintained by a sophisticated threat actor or commercial exploit developer.

Remediation

  1. Apply the May 2023 Windows cumulative update — this patches CVE-2023-29336. Windows Update, WSUS, or Microsoft Update Catalog are the distribution channels.
  2. Prioritize Windows versions still in the field without May 2023 patches — systems that haven't applied cumulative updates since before May 2023 remain vulnerable to this actively exploited zero-day.
  3. Apply Windows cumulative updates monthly — Win32k zero-days are regularly weaponized; monthly patching eliminates the window where known LPE bugs can be exploited.
  4. Implement least-privilege access — while this bug only requires low privilege, minimizing the number of users with interactive sessions on sensitive systems reduces the blast radius of any LPE exploit.
  5. Deploy endpoint detection for LPE behavior — monitoring for unprivileged processes spawning SYSTEM-privileged children or unexpected token manipulation is a behavioral indicator of LPE exploitation.

Key Details

PropertyValue
CVE ID CVE-2023-29336
Vendor / Product Microsoft — Win32k
NVD Published2023-05-09
NVD Last Modified2025-10-28
CVSS 3.1 Score7.8
CVSS 3.1 VectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-416 find similar ↗
CISA KEV Added2023-05-09
CISA KEV Deadline2023-05-30
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2023-05-30. Apply updates per vendor instructions.

Timeline

DateEvent
2023-05-09Microsoft May 2023 Patch Tuesday — CVE-2023-29336 patched as an actively exploited zero-day; CVE published and added to CISA KEV catalog on same day
2023-05-30CISA BOD 22-01 remediation deadline

References

ResourceType
Microsoft Security Response Center Advisory Vendor Advisory
NVD — CVE-2023-29336 Vulnerability Database
CISA KEV Catalog Entry US Government