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:
- Groom the kernel heap: allocate objects to position attacker-controlled data adjacent to or in the location the freed object occupied.
- Trigger the free: cause the vulnerable code path to release the kernel object.
- Reallocate: immediately allocate a different object (often a kernel data structure with attacker-controlled content) into the freed memory region.
- 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.
- 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
- Apply the May 2023 Windows cumulative update — this patches CVE-2023-29336. Windows Update, WSUS, or Microsoft Update Catalog are the distribution channels.
- 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.
- Apply Windows cumulative updates monthly — Win32k zero-days are regularly weaponized; monthly patching eliminates the window where known LPE bugs can be exploited.
- 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.
- 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
| Property | Value |
|---|---|
| CVE ID | CVE-2023-29336 |
| Vendor / Product | Microsoft — Win32k |
| NVD Published | 2023-05-09 |
| NVD Last Modified | 2025-10-28 |
| CVSS 3.1 Score | 7.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-416 find similar ↗ |
| CISA KEV Added | 2023-05-09 |
| CISA KEV Deadline | 2023-05-30 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2023-05-09 | Microsoft 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-30 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Microsoft Security Response Center Advisory | Vendor Advisory |
| NVD — CVE-2023-29336 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |