Go was bitten by this issue: CVE-2026-39822,
https://github.com/advisories/GHSA-xcgv-8mv7-v8c7
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.
// openReadonlyFlags are flags for open* syscalls to safely read a file or
// directory.
//
-// O_NOFOLLOW prevents symlink attacks in the last path component
+// O_NOFOLLOW prevents symlink attacks in the last path component (as long as
+// it doesn't end in a slash!)
// O_NONBLOCK is necessary to prevent blocking on FIFOs
const openReadonlyFlags = unix.O_RDONLY | unix.O_NOFOLLOW | unix.O_NONBLOCK