Advisory

GO-2026-4970

Also known as: BIT-golang-2026-39822, CVE-2026-39822

Summary

Root escape via symlink plus trailing slash in os

Details

On Unix systems, opening a file in an os.Root improperly follows symlinks to locations outside of the Root when the final path component of the a path is a symbolic link and the path ends in /.

For example, 'root.Open("symlink/")' will open "symlink" even when "symlink" is a symbolic link pointing outside of the root.

Severity

Not rated by the source.

Dates

Published
2026-07-07 21:34 UTC
Modified
2026-11-14 13:12 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.25.12, introduced 1.26.0-0, fixed 1.26.5, introduced 1.27.0-0, fixed 1.27.0-rc.2 (semver)

Fixed versions

1.25.12, 1.26.5, 1.27.0-rc.2

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences