What’s Vulnerable › Vulnerabilities
CVE-2026-27139: FileInfo can escape from a Root in os
- Severity: low (CVSS 2.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-03-06 · updated 2026-06-17
- Weakness: CWE-22
Description
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.
Affected products
- Go: before 1.25.8; 1.26.0 — fixed in 1.25.8
- Go Stdlib: before 1.25.8; from 1.26.0-0 before 1.26.1 — fixed in 1.25.8, 1.26.1
How to fix
Upgrade to a fixed version: Go 1.25.8; Go Stdlib 1.25.8, 1.26.1. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/749480
- https://go.dev/issue/77827
- https://groups.google.com/g/golang-announce/c/EdhZqrQ98hk
- https://pkg.go.dev/vuln/GO-2026-4602
Get alerted when CVE-2026-27139 or the next vulnerability affects your stack