On Unix systems, opening a file in an os.Root improperly
followed 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/") would open "symlink"
even when "symlink" is a symbolic link pointing outside of the root.
On Unix, openat(fd, path, O_NOFOLLOW) will follow symlinks
in path when path ends in a /. Root failed to account for
this behavior, permitting paths with a trailing / to escape.
It now properly sanitizes the path parameter provided to openat.
Thanks to Mundur (https://github.com/M0nd0R) for reporting this issue.
This is CVE-2026-39822 and Go issue https://go.dev/issue/79005.
This was a PRIVATE track issue, tracked in http://b/502195787.
On Unix systems, opening a file in an os.Root improperly
followed 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/")would open "symlink"even when "symlink" is a symbolic link pointing outside of the root.
On Unix,
openat(fd, path, O_NOFOLLOW)will follow symlinksin
pathwhenpathends in a /. Root failed to account forthis behavior, permitting paths with a trailing / to escape.
It now properly sanitizes the path parameter provided to openat.
Thanks to Mundur (https://github.com/M0nd0R) for reporting this issue.
This is CVE-2026-39822 and Go issue https://go.dev/issue/79005.
This was a PRIVATE track issue, tracked in http://b/502195787.