CVE-2010-4398 — Microsoft Windows Kernel Stack-Based Buffer Overflow Vulnerability

CVE-2010-4398

Microsoft Windows win32k.sys — RtlQueryRegistryValues Stack Overflow Enables Local Privilege Escalation and UAC Bypass

What is win32k.sys?

win32k.sys is the Windows kernel-mode driver responsible for the Windows graphical subsystem — including window management, the GDI (Graphics Device Interface), USER32 operations, and the kernel-mode portion of the Win32 API. As a kernel driver, win32k.sys runs in ring-0 with full system privileges. It processes input from all user-mode applications that use the Windows GUI, making it a high-value target: a vulnerability in win32k.sys that allows code execution provides immediate SYSTEM-level kernel privileges. The RtlQueryRegistryValues function is a Windows executive routine for reading multiple registry values in a single call, used throughout kernel drivers including win32k.sys for reading configuration data.

Overview

CVE-2010-4398 is a high-severity stack-based buffer overflow vulnerability (CWE-787, CVSS 7.8) in the win32k.sys Windows kernel driver. The RtlQueryRegistryValues function in win32k.sys copies registry data into a stack-allocated buffer without properly validating the size of the data being copied. A local attacker with low-level privileges can exploit this overflow to gain SYSTEM-level kernel privileges, bypassing User Account Control (UAC). Microsoft patched in Security Bulletin MS11-013 (February 2011). CISA added to KEV in March 2022.

Affected Versions

Product Vulnerable Fixed
Windows XP SP3 (32-bit) Affected Apply MS11-013
Windows Server 2003 SP2 Affected Apply MS11-013
Windows Vista SP1/SP2 Affected Apply MS11-013
Windows Server 2008 SP2 Affected Apply MS11-013
Windows 7 Affected Apply MS11-013
Windows Server 2008 R2 Affected Apply MS11-013

Technical Details

The stack-based buffer overflow (CWE-787: Out-of-Bounds Write) exists in win32k.sys's use of the RtlQueryRegistryValues kernel API. RtlQueryRegistryValues reads a series of registry values and places them into caller-supplied buffers described in an RTL_QUERY_REGISTRY_TABLE structure. The caller specifies the expected data type, the buffer, and the buffer size for each value.

The vulnerable code in win32k.sys allocates a fixed-size stack buffer for a registry value and passes this buffer to RtlQueryRegistryValues. If an attacker can populate the target registry key with a value whose data size exceeds the stack buffer size, RtlQueryRegistryValues will overflow the stack buffer when copying the registry data.

The exploitation path:

  1. A low-privileged local user writes a large value to the targeted registry key (standard user permissions are sufficient for certain registry paths)
  2. Triggers the code path in win32k.sys that reads this registry key
  3. RtlQueryRegistryValues overflows the stack buffer with the attacker-supplied registry data
  4. The overflow overwrites the return address on the kernel stack
  5. Execution redirects to attacker-controlled code running in kernel mode
  6. The attacker achieves code execution as SYSTEM

A notable aspect of this vulnerability is the UAC bypass capability: because the exploitation runs in kernel mode (ring-0), it completely bypasses UAC's security boundary between standard user and administrator. An attacker with a standard (non-elevated) user account can exploit CVE-2010-4398 to gain SYSTEM privileges without any UAC prompt.

Discovery

Identified by security researchers analyzing the win32k.sys kernel driver for memory safety vulnerabilities. The vulnerability was published in December 2010 but patched in the February 2011 Patch Tuesday cycle — a two-month gap that preceded formal coordinated disclosure timelines in some cases. The delay between CVE publication and patch suggests the vulnerability was disclosed to Microsoft on a compressed timeline or that patch quality checks extended the patch development period.

Exploitation Context

Windows kernel LPE vulnerabilities are core post-exploitation tools in targeted attacks:

  • Post-exploitation privilege escalation: CVE-2010-4398 was used after initial code execution at a standard user level — either from a separate initial exploitation (web browser, document vulnerability, phishing) or from stolen credentials. The kernel LPE provided the SYSTEM-level access needed for persistence, credential harvesting (via lsass memory access), and lateral movement.
  • UAC bypass significance: In Windows Vista and Windows 7, UAC was a significant improvement in Windows security posture. A kernel LPE that bypasses UAC entirely — without triggering any prompt — was particularly valuable for attackers operating against hardened Windows environments where standard users lacked administrative access.
  • Targeted attack toolkit component: win32k.sys vulnerabilities are among the most commonly exploited vulnerability class in nation-state Windows exploitation. CVE-2010-4398 was consistent with the profile of LPE vulnerabilities used in targeted espionage campaigns against government and defense targets.
  • Long-lived exploitability: Windows XP and Server 2003 deployments — which remained in enterprise use past their 2014 end-of-life date — continued to be exploitable by CVE-2010-4398 for years after the February 2011 patch, as many organizations prioritized other patches.

Remediation

  1. Apply MS11-013: Install the February 2011 Patch Tuesday security update for affected Windows versions.
  2. Upgrade Windows: Windows XP, Server 2003, Vista, and Server 2008 are end-of-life. Upgrade to Windows 10/11 or Windows Server 2019/2022.
  3. Principle of least privilege: Run user accounts as standard (non-administrative) users and enforce this via Group Policy — reducing the value of LPE vulnerabilities by limiting what an attacker can do before escalation.
  4. Credential Guard: On Windows 10 and later, enable Credential Guard to protect against credential harvesting even if kernel-level access is achieved.
  5. Patch management: Ensure Windows security patches (especially kernel-level win32k.sys patches) are applied within 30 days of release across all managed systems.

Key Details

PropertyValue
CVE ID CVE-2010-4398
Vendor / Product Microsoft — Windows
NVD Published2010-12-06
NVD Last Modified2025-10-22
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-787 find similar ↗
CISA KEV Added2022-03-28
CISA KEV Deadline2022-04-21
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: 2022-04-21. Apply updates per vendor instructions.

Timeline

DateEvent
2010-12-06CVE-2010-4398 published; stack overflow in win32k.sys RtlQueryRegistryValues via crafted driver reported
2011-02-08Microsoft released Security Bulletin MS11-013 (February 2011 Patch Tuesday) patching CVE-2010-4398
2022-03-28CISA added to KEV — reflecting continued exploitation of legacy Windows systems
2022-04-21CISA BOD 22-01 remediation deadline

References

ResourceType
NVD — CVE-2010-4398 Vulnerability Database
CISA KEV Catalog Entry US Government
Microsoft Security Bulletin MS11-013 Vendor Advisory