GetProcessHandleFromHwnd can obtain handles to protected processes on vulnerable Windows versions
The GetProcessHandleFromHwnd API allows any process with the same or higher integrity level to open a handle to another process, including protected processes, unless mitigated by recent patches.
Security & privacy Google Project Zero 26 Feb 2026 Disclosure Real-world evidence
Published as “A Deep Dive into the GetProcessHandleFromHwnd API”
Why it matters
The analysis reveals a long-standing privilege-escalation vector that let processes bypass UIPI and access protected processes until recent Windows updates mitigated it.
Summary
The author reverse-engineered GetProcessHandleFromHwnd across Vista, Windows 7, Windows 10 (1803) and Windows 11 (24H2), showing that early implementations opened the target process in kernel mode without access checks. This enabled a process with equal or higher integrity level (or UIAccess) to obtain handles to protected processes, a flaw reported as CVE-2023-41772. Subsequent patches changed the access mode to user mode and added UIPI-always-on checks, limiting but not fully eliminating the issue.
What they found 2
- The kernel implementation opens the target process with KernelMode access, skipping access checks.
“Crucially the access mode is set to KernelMode . This means that no access checks are performed on the process object.”
- When UIPI is disabled, the API can be used to obtain a handle to a protected process.
“If you open a handle to a protected process with the access mode set to KernelMode then it’ll be permitted completely bypassing the protection.”
Caveats 5
- The latest Windows 11 24H2 version forces the API to use UserMode access when UIPI checks fail, removing the privilege boost from the UI Access flag.
- Quote: "The end result is having the UI Access flag enabled doesn’t grant any additional privileges over calling the NtOpenProcess system call directly."
- Exploitation requires the UI Access flag or a token-stealing technique to meet the integrity/UIPI requirements.
- Disabling UIPI and the ResponsiblePid feature flag requires administrator rights and a reboot.
- The attack only works on versions prior to the Windows 11 24H2 patch or on systems where UIPI is disabled.
What’s new here 4
- Identified that the API opened target processes with KernelMode access, bypassing security checks.
- Documented the evolution of the implementation from user-mode hooks to a Win32k kernel function.
- Disclosed CVE-2023-41772 and described Microsoft’s fix in later Windows builds.
- Demonstrated a practical exploitation path to obtain handles to protected processes on vulnerable systems.