CVE-2026-27139: FileInfo can escape from a Root in os
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 Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-27139?
CVE-2026-27139 has been rated as a medium severity vulnerability.
How does CVE-2026-27139 affect my application?
CVE-2026-27139 allows an attacker to read metadata of files outside the specified Root directory on Unix platforms.
Which versions of Golang are affected by CVE-2026-27139?
CVE-2026-27139 affects Golang versions up to 1.25.8 and version 1.26.0.
How do I fix CVE-2026-27139?
To fix CVE-2026-27139, update your Golang installation to a version later than 1.26.0.
What mitigation strategies can I employ for CVE-2026-27139?
Restrict directory permissions and validate file paths to mitigate the impact of CVE-2026-27139.