The Definitive Guide on Win32 to NT Path Conversion
Summary: Project Zero's James Forshaw published a 2016 guide showing that Win32 file paths pass through RtlDosPathNameToRelativeNtPathName_U, which sorts them into 7 path types and canonicalizes them by converting forward slashes, collapsing separators, resolving dot and double-dot elements, and stripping trailing spaces and dots. The post states that incorrect handling of Win32 paths can lead to security vulnerabilities, and that the documentation is incomplete relative to what the OS actually implements.
What's compelling: Any code that takes an untrusted path and either skips sanitization or sanitizes without understanding all 7 path types and the canonicalization rules can be exploited, which is how a colleague's path-handling vulnerability was found and then extended using barely documented conversion behavior.
Read the original at Google Project Zero ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026