CVE-2025-22873 Improper access to parent directory of root in os
Attackers can access the parent directory of an os.Root by using a trailing slash, potentially exposing directory contents.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-22873?
CVE-2025-22873 is a low-severity path traversal vulnerability in Golang Go, published on 4 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
It was possible to improperly access the parent directory of an os.Root by opening a filename ending in "../". For example, Root.Open("../") would open the parent directory of the Root. This escape only permits opening the parent directory itself, not ancestors of the parent or files contained within the parent.
Weakness: CWE-23
Which versions are affected by CVE-2025-22873?
2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | All versions | 1.23.9, 1.24.3 |
stdlib Go | All versions | 1.23.9, 1.24.3 |
Linux distribution packages (16)
go1.24 SUSE:Enterprise Storage 7.1 | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.24.3-150000.1.23.1 |
go1.24 SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 1.24.3-150000.1.23.1 |
go1.24 openSUSE:Leap 15.6 | All versions | 1.24.3-150000.1.23.1 |
go1.24 openSUSE:Tumbleweed | All versions | 1.24.3-1.1 |
Products include Golang Go.
How do I fix CVE-2025-22873?
Upgrade golang to a fixed version for your release line: 1.23.9 or 1.24.3.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-22873 being exploited?
There is no known exploitation of CVE-2025-22873 in the wild and no public exploit code.
Other vulnerabilities in Golang Go
- CVE-2020-0601 Microsoft Windows CryptoAPI Spoofing
- CVE-2026-27143 Missing bound checks can lead to memory corruption in safe Go in cmd/compile
- CVE-2024-24790 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip
- CVE-2023-39320 Arbitrary code execution via go.mod toolchain directive in cmd/go
- CVE-2023-24540 Improper handling of JavaScript whitespace in html/template
Sources
Also known as BELL-CVE-2025-22873, BIT-golang-2025-22873, CLEANSTART-2026-CB13715, CLEANSTART-2026-ZC33521, DEBIAN-CVE-2025-22873, ECHO-cc1a-f211-d25d and 48 more.