CVE-2025-22873 Improper access to parent directory of root in os

Low 3.8 Published Updated

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.

PackageAffectedFixed in
golang BitnamiAll versions1.23.9, 1.24.3
stdlib GoAll versions1.23.9, 1.24.3
Linux distribution packages (16)
go1.24 SUSE:Enterprise Storage 7.1All versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Module for Development Tools 15 SP6All versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Module for Development Tools 15 SP7All versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Server 15 SP4-LTSSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Server 15 SP5-LTSSAll versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Server for SAP Applications 15 SP3All versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Server for SAP Applications 15 SP4All versions1.24.3-150000.1.23.1
go1.24 SUSE:Linux Enterprise Server for SAP Applications 15 SP5All versions1.24.3-150000.1.23.1
go1.24 openSUSE:Leap 15.6All versions1.24.3-150000.1.23.1
go1.24 openSUSE:TumbleweedAll versions1.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.

All Golang Go vulnerabilities

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.

Is CVE-2025-22873 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free