CVE-2026-27139
Received Received - Intake
Directory Traversal in Go File.ReadDir Allows Metadata Disclosure

Publication date: 2026-03-06

Last updated on: 2026-04-21

Assigner: Go Project

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-06
Last Modified
2026-04-21
Generated
2026-05-07
AI Q&A
2026-03-07
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
golang go to 1.25.8 (exc)
golang go 1.26.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

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 directory in which the File was opened.

This means that the directory listing can escape the intended root directory and include metadata about files located elsewhere on the filesystem.

However, this escape is limited to reading metadata provided by lstat and does not allow reading or writing the actual file contents outside the root.


How can this vulnerability impact me? :

This vulnerability allows an attacker or user to obtain metadata information about files outside the intended root directory when listing directory contents.

While it does not permit reading or writing the actual file contents outside the root, the exposure of metadata could potentially reveal sensitive information such as file existence, permissions, or timestamps.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

I don't know


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart