Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-22873: CWE-23: Relative Path Traversal in Go standard library os

0
Low
VulnerabilityCVE-2025-22873cvecve-2025-22873cwe-23
Published: Wed Feb 04 2026 (02/04/2026, 23:05:24 UTC)
Source: CVE Database V5
Vendor/Project: Go standard library
Product: os

Description

CVE-2025-22873 is a relative path traversal vulnerability in the Go standard library's os package that allows opening the parent directory of a defined root directory by using a filename ending with ".. /". This vulnerability permits access only to the immediate parent directory, not to higher-level ancestors or files within the parent directory. It affects Go versions up to 1. 24. 0-0 and has a low CVSS score of 3. 8, indicating limited impact. Exploitation requires local privileges and no user interaction but can lead to limited confidentiality exposure by allowing directory traversal beyond intended boundaries. No known exploits are currently reported in the wild. European organizations using vulnerable Go versions in applications that enforce directory restrictions via os.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/12/2026, 07:34:44 UTC

Technical Analysis

CVE-2025-22873 is a relative path traversal vulnerability identified in the Go programming language's standard library, specifically within the os package. The vulnerability arises because the os.Root.Open method improperly handles filenames ending with "../", allowing an attacker or a malicious process to open the parent directory of the specified root directory. This escape mechanism is limited to accessing only the immediate parent directory and does not permit traversal beyond that or access to files contained within the parent directory. The flaw exists in Go versions up to 1.24.0-0. The vulnerability is classified under CWE-23 (Relative Path Traversal) and has a CVSS v3.1 base score of 3.8, reflecting low severity. The attack vector is local (AV:L), requiring low privileges (PR:L) but no user interaction (UI:N). The scope is changed (S:C) because the vulnerability allows access outside the intended root directory boundary, impacting confidentiality (C:L) but not integrity or availability. No known exploits have been reported in the wild, indicating limited active threat. The vulnerability could be exploited in scenarios where applications rely on os.Root to sandbox file system access, potentially allowing unauthorized directory access that could lead to information disclosure or aid in further attacks. Since the vulnerability only allows opening the parent directory itself and not files within it, the impact is constrained. However, it still represents a security risk in environments where strict directory isolation is critical. No official patches or updates are linked yet, so mitigation currently depends on workarounds or upgrading once fixes are released.

Potential Impact

For European organizations, the impact of CVE-2025-22873 is primarily related to confidentiality breaches due to unauthorized access to parent directories outside intended sandbox boundaries. Organizations that develop or deploy software written in Go and use the os package's Root.Open method for directory restrictions are at risk. This could include cloud service providers, financial institutions, and technology companies relying on Go for backend services. Although the vulnerability does not allow access to files within the parent directory, merely opening the directory can reveal directory existence and metadata, potentially aiding attackers in reconnaissance or privilege escalation chains. The low CVSS score and lack of known exploits suggest limited immediate risk; however, in sensitive environments where directory isolation is critical, even this limited traversal can undermine security assumptions. European organizations with strict data protection regulations (e.g., GDPR) must consider the potential for unauthorized data exposure. The vulnerability's local attack vector means that attackers need some level of access already, so it is less likely to be exploited remotely but could be leveraged by insiders or through chained exploits. Overall, the impact is low but non-negligible in high-security contexts.

Mitigation Recommendations

European organizations should prioritize upgrading Go to versions beyond 1.24.0-0 once official patches addressing CVE-2025-22873 are released. Until then, developers should implement additional validation on file paths passed to os.Root.Open to prevent filenames ending with "../" or other path traversal patterns. Employing strict input sanitization and canonicalization of file paths before opening them can reduce risk. Where possible, avoid relying solely on os.Root for sandboxing and complement it with OS-level sandboxing mechanisms such as containerization or mandatory access controls (e.g., AppArmor, SELinux). Conduct code audits to identify usage of os.Root.Open and assess exposure. For critical applications, consider restricting local user privileges to minimize the risk of exploitation by low-privileged users. Monitoring file system access patterns for unusual directory openings may help detect exploitation attempts. Finally, maintain awareness of updates from the Go project and apply patches promptly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Go
Date Reserved
2025-01-08T19:11:42.835Z
Cvss Version
null
State
PUBLISHED

Threat ID: 6983d2fdf9fa50a62fb3480c

Added to database: 2/4/2026, 11:15:09 PM

Last enriched: 2/12/2026, 7:34:44 AM

Last updated: 3/21/2026, 2:28:42 PM

Views: 96

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses