Live threats

All CVEs / Go standard library

CVE-2026-56857Go standard library os

Path restriction bypass in os.Mkdir on Windows

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
—
Auth required
No
Published
Oct 8, 2026
Updated
Oct 9, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1386
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

Go's standard library on Windows allows creating directories outside the specified root directory when the target is a junction pointing to an empty location. An unauthenticated attacker can bypass path restrictions and write files to unauthorized locations.

Show the original NVD text

On Windows, when the target of Root.Mkdir or Root.MkdirAll is a junction pointing to an empty location, the operation can create a directory at the junction target even when that target is 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).

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 1.26.9, 1.27.2

Update Go to version 1.26.9, 1.27.2 or later.

Vendor advisory · groups.google.com ↗

  1. Apply the vendor's security update for os.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go stdlib < 1.26.9 1.26.9 go get stdlib@v1.26.9
Go stdlib ≥ 1.27.0-0 < 1.27.2 1.27.2 go get stdlib@v1.27.2

Per OSV / GitHub Advisories (GO-2026-6604). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official advisories

Also: SUSE (+11)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.