Join our Newsletter — 33% off our NHI Course

What causes path equivalence using Windows 8.3 filenames?

Path equivalence using Windows 8.3 filenames is caused by comparing file paths without accounting for the short DOS alias that Windows may generate for a longer name. An attacker can use the alternate form to bypass allowlists or access checks. Normalise paths before comparing them and verify the final resolved target rather than the raw string.

Why 8.3 Short Names Create Path Equivalence

Windows can generate an older short DOS alias for a longer filename, so two different strings may resolve to the same underlying path. The security issue appears when code compares the raw text instead of the resolved object. That allows an alternate name to slip past allowlists, deny rules, or access checks even though the target is the same file.

Path equivalence is not a formatting quirk, it is a resolution problem. The file system may recognise both the long name and the 8.3 alias, and applications that treat either string as authoritative can be tricked into making inconsistent decisions. The risk grows when path checks, authorization checks, and final file access are done at different layers.

Normalisation must happen before comparison, and the comparison must be against the final resolved target, not a user-supplied representation. That means the application should work from a canonical path or a fully resolved handle, then apply policy once the file identity is fixed.

How the Bypass Happens in Practice

An attacker supplies a path that looks harmless to a string-based filter but resolves to a protected file through its short name. If the application only checks for blocked prefixes, file extensions, directory names, or approved folders, the alternate alias can bypass those checks. The weakness is the mismatch between what the program thinks it is comparing and what the operating system ultimately opens.

This problem often shows up in upload handlers, download endpoints, backup tooling, and administrative utilities that accept paths from users or scripts. Any place that trusts a text comparison before the file system has canonicalised the path is a candidate for abuse. The issue is especially dangerous when the code uses the same string both to decide access and to perform the action.

What Correct Defences Need to Do

Defence needs to be anchored in canonical resolution rather than naming conventions. Resolve the path using platform APIs, compare the canonical result to the expected location, and reject requests that depend on alternate names, ambiguous traversal, or inconsistent representations. If the final target cannot be resolved safely, treat that as a failure, not a fallback to the raw string.

CWE Top 25 Guide is useful here because path equivalence belongs to the broader class of common software weaknesses that arise when validation and comparison are done on the wrong representation. The practical lesson is to compare after normalisation, not before.

Testing should include both long and short names, mixed separators, traversal variants, and any path form the platform can resolve to the same object. If the application enforces policy in one form but opens the file in another, the control is incomplete. Review both the allowlist logic and the actual file-open call path, because both must agree on the same resolved target.

Risk and Threat Considerations

Path-equivalence flaws can turn a simple filename into an authorization bypass. The attacker is not breaking the file system itself, they are exploiting a gap between string-level checks and object-level access, which can expose restricted files, protected directories, or security-sensitive functionality.

Failure mechanism: The application validates one path representation, then the operating system resolves a different but equivalent name to the same target. That creates a control gap when allowlists, denylists, or access decisions are tied to the raw string instead of the resolved file object.

Impact: A successful bypass can lead to unauthorized read, write, overwrite, or execution of files that should have been blocked. In admin or upload workflows, that can become a path to broader compromise if the protected target influences code, configuration, or privileged data.

Practitioner Guidance

What to verify: Confirm that every security decision is made on the same canonical representation that the operating system will use for the final open, create, or delete operation. If the policy engine and the file access layer can disagree, the control is not reliable.

Common mistake: Do not rely on filename patterns alone, because 8.3 aliases can make two different strings map to one file. Also avoid assuming that blocking a visible directory name blocks all equivalent references to that directory.

Practitioner takeaway: The safest design is to resolve first, then authorise. If a path can be represented in more than one way, the decision must follow the resolved object, not the user-visible text.