Skip to content

os: Root.Mkdir(All) can follow junctions out of the root on Windows #81739

Closed

Description

@neild

On Windows, when the target of Root.Mkdir or Root.MkdirAll was a junction
pointing to an empty location, the operation would create a directory at
the junction target even when that target was located outside the root.
This only applies to operations where the last path component is a
junction (path/to/junction, but not path/junction/target).

Root.Mkdir and Root.MkdirAll now correctly avoid resolving junctions.

Thanks to Daniele Ballarini for reporting this issue.

This is CVE-2026-56857 and Go issue https://go.dev/issue/81739.


This was a PRIVATE track issue originally tracked in http://b/533399726.

Activity

  1. added this to the Go1.28 milestone on Sep 24, 2026
  2. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Sep 29, 2026
  3. removed
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Sep 30, 2026
  4. thatnealpatel commented on Sep 30, 2026

    @thatnealpatel
    Member

    @gopherbot Please open backports for this security issue.

  5. gopherbot commented on Sep 30, 2026

    @gopherbot
    Contributor

    Backport issue(s) opened: #81897 (for 1.26), #81898 (for 1.27).

    Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

  6. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Oct 5, 2026
  7. gopherbot commented on Oct 8, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/847029 mentions this issue: [release-branch.go1.27] os: correct Root junction handling on Windows (avoid mkdir escape)

  8. gopherbot commented on Oct 8, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/847109 mentions this issue: [release-branch.go1.26] os: correct Root junction handling on Windows (avoid mkdir escape)

  9. gopherbot commented on Oct 8, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/847305 mentions this issue: os: correct Root junction handling on Windows (avoid mkdir escape)

  10. changed the title [-]security: fix CVE-2026-56857[/-] [+]os: Root.Mkdir(All) can follow junctions out of the root on Windows[/+] on Oct 8, 2026
  11. removed
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Oct 8, 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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions