Go os Package Directory Traversal Vulnerability in Root Access

Vulnerability

A directory traversal vulnerability has been identified in the Go programming language's os package, specifically in versions prior to 1.24.3. This vulnerability allows improper access to the parent directory of an os.Root by opening a filename that ends with '../'. For instance, using Root.Open('../') would access the parent directory. However, this escape only enables access to the immediate parent directory, not to its ancestors or any files within it. The issue was reported by Dan Sebastian Thrane of SDU eScience Center.

Impact

Exploitation of this vulnerability allows for improper directory traversal, enabling access to the parent directory of an os.Root, which could lead to unauthorized file access or manipulation.

Reproduction

To reproduce this vulnerability, use Go versions prior to 1.24.3. Open a file using the Root.Open() method with a filename that includes a path traversal sequence, such as '../'. This will access the parent directory of the Root, demonstrating the improper directory traversal.

Remediation

Users can upgrade to Go version 1.24.3 or 1.23.9, both of which include the necessary security fix. Instructions for downloading these versions are available on the Go website.

Added: Feb 4, 2026, 11:40 PM
Updated: Feb 4, 2026, 11:40 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
0.6
exploitability
5.7
remediation
7.7
relevance
2.6
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.