---
title: "A Deep Dive into the GetProcessHandleFromHwnd API"
description: "GetProcessHandleFromHwnd has changed substantially since Vista."
url: "https://swe.quest/articles/a-deep-dive-into-the-getprocesshandlefromhwnd-api-8993574ef8eaaabd"
canonical: "https://projectzero.google/2026/02/gphfh-deep-dive.html"
source: "Google Project Zero"
published: "2026-02-26"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 14
tags: ["vulnerability-research","operating-systems","sandboxing","identity-auth"]
---

# A Deep Dive into the GetProcessHandleFromHwnd API

A post on [Google Project Zero](https://swe.quest/sources/project-zero.md), published 2026-02-26, 14 min read, Deep dive. Original: [https://projectzero.google/2026/02/gphfh-deep-dive.html](https://projectzero.google/2026/02/gphfh-deep-dive.html)

## Summary

GetProcessHandleFromHwnd has changed substantially since Vista. It started as a user-mode windows hook in oleacc.dll that duplicated a limited process handle back to the caller. In Windows 10 1803 it became the Win32k kernel call NtUserGetWindowProcessHandle, which opened processes with KernelMode access and so skipped access checks entirely. That let UI Access holders, and any caller at equal or higher integrity, open sandboxed or protected processes that own a window (CVE-2023-41772). The partial fix and the Windows 11 24H2 changes (process protection in UIPI checks, a UIPIAlwaysOn feature flag, and a ResponsiblePid path requiring UI Access) close some gaps but leave quirks such as PPL App processes being able to open one another.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Vulnerability research](https://swe.quest/tags/vulnerability-research.md) (Security)
- [Operating systems](https://swe.quest/tags/operating-systems.md) (Infrastructure)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)

## Prerequisites

- Windows integrity levels and UAC
- Windows process access rights
- Protected processes (PPL)
- Win32k and windows hooks

## Keywords

GetProcessHandleFromHwnd, NtUserGetWindowProcessHandle, UIPI, UI Access, CVE-2023-41772, Win32k, oleacc.dll, Administrator Protection

## Related posts

- [Bypassing Administrator Protection by Abusing UI Access](https://swe.quest/articles/bypassing-administrator-protection-by-abusing-ui-access-d525ebf6ba5a8d3f.md): Google Project Zero · 2026-02-12 · Hard · 18 min read · Vulnerability research, Identity & auth, Operating systems, Security
  UI Access, the token flag Windows Vista added so accessibility tools could bypass User Interface Privacy Isolation, silently gives a limited user a High-integrity process.
- [Improved Process Isolation in Firefox 100](https://swe.quest/articles/improved-process-isolation-in-firefox-100-c5bc38aed6bfa0ee.md): Mozilla Hacks · 2022-05-12 · Hard · 9 min read · Sandboxing & isolation, Browsers, Security, Operating systems
  Firefox 100 enables Win32k Lockdown on Windows, using PROCESS\_MITIGATION\_SYSTEM\_CALL\_DISABLE\_POLICY to block web content processes from calling the historically exploitable win32k.sys kernel APIs.
- [A 0-click exploit chain for the Pixel 10: When a Door Closes, a Window Opens](https://swe.quest/articles/a-0-click-exploit-chain-for-the-pixel-10-when-a-door-closes-a-window-opens-0c88e2681240c6b5.md): Google Project Zero · 2026-05-13 · Hard · 5 min read · Vulnerability research, Mobile, Linux, Memory safety
  Project Zero ported its Pixel 9 zero-click chain to the Pixel 10 by re-offsetting the Dolby UDC exploit (CVE-2025-54957), overwriting dap\_cpdp\_init instead of \_\_stack\_chk\_fail because RET PAC replaced stack protectors.
- [VirtualBox Process Hardening on Windows 2026 Edition: What’s a Single Bit Between Friends?](https://swe.quest/articles/virtualbox-process-hardening-on-windows-2026-edition-what-s-a-single-bit-1069b5979c740309.md): Google Project Zero · 2026-11-23 · Hard · 13 min read · Vulnerability research, Sandboxing & isolation, .NET, Virtualization, Security
  The .NET Framework v4 loader falls back from an image-section mapping (SEC\_IMAGE) to a plain data mapping (FlatImageLayout) whenever NtCreateSection fails with STATUS\_INVALID\_IMAGE\_FORMAT, so assemblies can execute without passing image-based DLL verification.
- [Zed Weekly: #29](https://swe.quest/articles/zed-weekly-29-41f27bba860d0170.md): Zed · 2023-12-15 · Medium · 6 min read · Rust, Memory management, Performance engineering, Frontend, Developer tools
  Zed's port to GPUI 2 is nearing daily usability, and the team is focused on frame-rendering performance measured by holding tab-switch at 60Hz key repeat.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
