Skip to content

Windows: path validators refuse paths on a mapped network drive #1107

Closed

Description

@scttfrdmn

Limitation of #1036 (the #1000 fix), recorded so it isn't lost.

pkg/security resolves an existing path with GetFinalPathNameByHandle to defeat junction/symlink escapes. For a mapped drive, Z:\data\x resolves to \\?\UNC\server\share\data\x, which normaliseFinalPath (path_resolve_windows.go) turns into \\server\share\data\x. That no longer has the allowed root Z:\… as a prefix, so a legitimate path under a root on a mapped drive is refused as outside it.

Fails closed (refuses, never admits), so it is not a security hole; it only matters if a Windows user configures a root on a mapped drive. Fix direction: resolve the ROOT through the same GetFinalPathNameByHandle call before comparing, so both sides are in \\server\share form, with a Windows test using a subst/mapped drive.

Activity

  1. added 2 commits that reference this issue on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions