CVE-2025-22873
Directory Traversal in Go os.Root Allows Parent Directory Access
Publication date: 2026-02-04
Last updated on: 2026-02-10
Assigner: Go Project
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| golang | go | to 1.23.9 (exc) |
| golang | go | From 1.24.0 (inc) to 1.24.3 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-23 | The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability allows improper access to the parent directory of an os.Root by opening a filename that ends with "../". For example, using Root.Open("../") would open the parent directory of the Root directory. However, this escape only permits opening the immediate parent directory itself, not any higher-level ancestor directories or files contained within the parent directory.
How can this vulnerability impact me? :
The vulnerability could allow an attacker or unauthorized user to access the parent directory of a restricted root directory, potentially exposing directory contents that were intended to be protected. Although the access is limited to the immediate parent directory and does not extend to ancestors or files within the parent, this could still lead to information disclosure or unauthorized directory traversal.
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