LOW2.5
GO-2026-4602
FileInfo can escape from a Root in os
Quick fix
GO-2026-4602 — stdlib: upgrade to the fixed version with the command below.
go get stdlib@v1.25.8Details
On Unix platforms, when listing the contents of a directory using File.ReadDir or File.Readdir the returned FileInfo could reference a file outside of the Root in which the File was opened.
The impact of this escape is limited to reading metadata provided by lstat from arbitrary locations on the filesystem without permitting reading or writing files outside the root.
Are you affected?
Enter the version of the package you're using.