# 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.

- **Severity:** Low 3.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`)
- **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:** Yes
- **Published:** 4 Feb 2026
- **Updated:** 5 Feb 2026
- **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, GHSA-p3p7-9h4w-jqw2, GO-2026-4403, MINI-2m2f-8jq7-m5mq, MINI-2wx3-wxxq-qjgf, MINI-2x93-7hm5-q3jm, MINI-33jg-h863-hrw2, MINI-377r-g742-3r79, MINI-4mmx-wgqp-23h8, MINI-55xf-9qvj-xfjw, MINI-59q7-7hj8-53vf, MINI-6rmj-qw52-qg2p, MINI-75cq-p5ww-c389, MINI-7f3m-286h-mgh2, MINI-7h6j-p8wp-r573, MINI-7j6m-w2h4-x8gx, MINI-84qm-rp8x-w38c, MINI-85w2-2f9p-27q8, MINI-8pjh-vjpg-vjmc, MINI-c9jr-3w39-q55q, MINI-fwv9-6jrr-g9vr, MINI-gjwv-r7qr-gc52, MINI-gm77-3cpw-325r, MINI-gph3-3g3w-47q4, MINI-h73v-7wp7-6247, MINI-hj4c-c97q-x8qx, MINI-jpj3-xxf2-j6cf, MINI-m5mh-c5jf-2rm5, MINI-mp9h-6q3f-7p99, MINI-pm5j-32f3-jj55, MINI-q5wg-7mh4-wc7r, MINI-qvw4-42wj-m3q4, MINI-rjfr-686m-xrgr, MINI-rm29-7rm2-mwv2, MINI-rmx2-v3pq-4fq6, MINI-v842-h3cp-2236, MINI-vc9w-7984-qrjf, MINI-w555-jc2m-f2vh, MINI-w6c4-pxvh-fjgg, MINI-w7c4-3fvj-2xfj, MINI-wpp3-4v6q-p47v, MINI-wpwq-wc6v-m3qr, MINI-x4pf-j2cj-c5w9, MINI-xh7j-fhwm-x98r, MINI-xhx5-7m88-p7mj, SUSE-SU-2025:01551-1, SUSE-SU-2025:1551-1, UBUNTU-CVE-2025-22873, openSUSE-SU-2025:15058-1

## 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 (Relative Path Traversal)

## 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 | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang` | Bitnami | All versions | 1.23.9, 1.24.3 |
| `stdlib` | Go | All versions | 1.23.9, 1.24.3 |
| `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: 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.

## 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](https://insights.sbomify.com/CVE-2020-0601/): Microsoft Windows CryptoAPI Spoofing (high 8.1, exploited in the wild)
- [CVE-2026-27143](https://insights.sbomify.com/CVE-2026-27143/): Missing bound checks can lead to memory corruption in safe Go in cmd/compile (critical 9.8)
- [CVE-2024-24790](https://insights.sbomify.com/CVE-2024-24790/): Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip (critical 9.8)
- [CVE-2023-39320](https://insights.sbomify.com/CVE-2023-39320/): Arbitrary code execution via go.mod toolchain directive in cmd/go (critical 9.8)
- [CVE-2023-24540](https://insights.sbomify.com/CVE-2023-24540/): Improper handling of JavaScript whitespace in html/template (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-22873 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2025-22873 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang (Bitnami): affected all versions; fixed in 1.23.9, 1.24.3
- stdlib (Go): affected all versions; fixed in 1.23.9, 1.24.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-22873/ (Markdown: https://insights.sbomify.com/CVE-2025-22873/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-22873
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-22873
- OSV: https://osv.dev/vulnerability/CVE-2025-22873

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-22873/
Summaries are generated and may contain mistakes; the official description above is the record.
