GO-2026-4602

Source
https://pkg.go.dev/vuln/GO-2026-4602
Import Source
https://vuln.go.dev/ID/GO-2026-4602.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2026-4602
Aliases
  • CVE-2026-27139
Published
2026-03-06T21:03:42Z
Modified
2026-03-09T02:03:56.223991Z
Summary
FileInfo can escape from a Root in os
Details

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.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2026-4602"
}
References
Credits
    • Miloslav Trmač of Red Hat

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.25.8
Introduced
1.26.0-0
Fixed
1.26.1

Ecosystem specific

{
    "imports": [
        {
            "symbols": [
                "File.ReadDir",
                "File.Readdir",
                "ReadDir",
                "dirFS.ReadDir",
                "rootFS.ReadDir"
            ],
            "path": "os"
        }
    ]
}

Database specific

source
"https://vuln.go.dev/ID/GO-2026-4602.json"