# CVE-2026-50162: oras-go: file store write outside workingDir via symlink traversal

> An attacker can write files outside the intended working directory via symlink traversal in the oras-go library, potentially overwriting arbitrary files.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jul 2026
- **Updated:** 20 Jul 2026
- **Also known as:** CLEANSTART-2026-BJ99238, CLEANSTART-2026-XC86344, DEBIAN-CVE-2026-50162, GHSA-8xwf-rjm4-xvhv, GO-2026-5879, MINI-22r6-mj52-7h6r, MINI-24cc-p9c3-qm2w, MINI-259p-jvvv-h9g4, MINI-263g-46h8-ch4g, MINI-29qm-hqx9-v43v, MINI-2gch-r75c-h49w, MINI-2hqx-95c9-5466, MINI-2v9g-2gxq-pvmp, MINI-2ww7-fm4w-h3w8, MINI-2xmm-8756-99hp, MINI-33rh-xcj9-cvj6, MINI-35xp-mxjm-q3f4, MINI-38wh-4m8p-jpch, MINI-39rq-4cfv-p46f, MINI-3h28-7rjm-c9mh, MINI-3q6h-fr9f-6p9w, MINI-3qgf-r8f5-6rvw, MINI-3vmq-f9m9-2g65, MINI-3w3f-777f-xcr8, MINI-3whq-fprw-w2mj, MINI-4382-5qqv-94r3, MINI-47mp-m6cg-5ppg, MINI-47r7-4fv5-jj8g, MINI-49f2-wj64-xx75, MINI-49hg-qj6m-hqg4, MINI-4gv8-gr6j-75qv, MINI-4jh6-6g36-vrxj, MINI-4mhq-vcpf-hqpq, MINI-4mvm-mpxh-47vm, MINI-4q9j-h472-933p, MINI-4v39-48mp-484q, MINI-4wfm-f53r-m7j9, MINI-52wg-cc28-h8qg, MINI-539r-q5qm-xjh4, MINI-59p9-95fp-ffcx, MINI-5c7q-8xmj-9763, MINI-5gq8-rcfj-mwrf, MINI-5j6x-p3xh-wqqv, MINI-5qpc-whqv-chm5, MINI-5v9q-3f48-pxm3, MINI-5vqr-m7j4-hqx4, MINI-5xjc-pjf2-6xcg, MINI-62f4-53r7-6vw4, MINI-6774-3x7f-h35c, MINI-6899-f6j7-j75p, MINI-68r5-h443-8fxr, MINI-6f63-2mcf-9mj9, MINI-6fp6-8j4r-26h5, MINI-6fp9-4v2q-32j2, MINI-6jrg-8x78-52q4, MINI-6r2f-w8vw-4phh, MINI-6r7g-gr9j-8rxj, MINI-6r8q-8gp8-7ff6, MINI-6rm5-p9mv-qwp2, MINI-7387-jq6p-9257, MINI-743v-79jj-pf9x, MINI-7697-h7rm-pr5q, MINI-78wx-2m47-xp7h, MINI-7jhh-5m78-92p5, MINI-8226-jw52-873w, MINI-822q-h679-qcrh, MINI-8254-8xmq-mvxr, MINI-83pc-mwjv-r2wx, MINI-866f-8hg4-6g95, MINI-86w8-w2vp-m756, MINI-883g-wxpf-jfwg, MINI-8g8m-h526-3wg6, MINI-8xrp-p94g-8ggp, MINI-972r-9c79-65h9, MINI-97q4-f3w7-5g79, MINI-9969-jhjx-f83h, MINI-9f9p-v325-9wwc, MINI-9fxr-689q-w4cf, MINI-9gp7-8gm4-rrrh, MINI-9j68-h335-hg59, MINI-9mgg-5jcw-qxc2, MINI-9ww4-r2pj-893c, MINI-9xqq-2929-qhqx, MINI-c26x-jxwh-6mcf, MINI-c6xc-cx9w-v43r, MINI-c7vh-gmxh-2whm, MINI-c8mh-96fh-3m4g, MINI-c9pp-qv75-ww2c, MINI-cc39-ccm5-9p76, MINI-cc86-5wqv-q79q, MINI-cm3w-4wr9-q664, MINI-cmhm-gr3w-g968, MINI-cmvj-g8h6-mqmr, MINI-cpf3-cr54-j7gc, MINI-cq56-2849-7rxp, MINI-cvrr-3mpr-fg9r, MINI-f6j6-qgv8-mcg6, MINI-f9f6-7j4v-7fh8, MINI-fcwh-5m5f-ww9v, MINI-ffpr-73v6-w65x, MINI-fjc2-rpw7-67m2, MINI-fqgj-7mmf-ccg2, MINI-fxfg-m9wj-g323, MINI-fxhq-5qg7-fw57, MINI-fxhq-6wmx-9p35, MINI-g2cv-w4wm-ff8w, MINI-g48r-77q2-hgqq, MINI-g76r-vg37-569w, MINI-g7xc-7x3x-6v92, MINI-g9wm-8vcf-fwqx, MINI-grfm-35v6-xqg5, MINI-gvwg-47f5-4h49, MINI-h4fj-2hhv-fh8m, MINI-h8j3-rh35-f6mm, MINI-hf5m-gc2j-mc3h, MINI-hf78-xg5g-m2xf, MINI-hjjm-v275-j44r, MINI-hr8g-59v2-8v74, MINI-j3cx-74wm-pqj4, MINI-j47w-57p3-ph24, MINI-j6wh-vjf7-327h, MINI-j7p5-wx5v-4q8m, MINI-j8q6-q6wf-9rf2, MINI-j8q9-x8c5-pmfp, MINI-j8vc-qwrf-8xmj, MINI-jf27-gvc4-8wrq, MINI-jf54-6p7w-9q8g, MINI-jfr5-rr6g-r5q5, MINI-jm3v-v47j-mgj6, MINI-jv38-6ccv-qmpg, MINI-jxxv-q2j3-rw99, MINI-m32h-3x43-j8mc, MINI-m3wm-www8-867h, MINI-m463-phxf-qrr2, MINI-m67w-4mcr-f693, MINI-mcmp-qpqw-fc6r, MINI-mcq3-f82c-c434, MINI-mfwg-wfpc-5p32, MINI-mhjv-c77f-f978, MINI-mr4p-m5x9-pp4w, MINI-mv38-vm23-fxvc, MINI-mvp7-pjxv-jpv4, MINI-mw5x-f4h3-6g5f, MINI-p289-v2ff-7wp9, MINI-p3c2-4547-g6j3, MINI-p4jm-78qh-86fp, MINI-p54q-ph6j-3c68, MINI-p7j8-x2v9-4pr6, MINI-pcvf-c6px-jhc8, MINI-pfgj-9m2r-rg8q, MINI-px8h-hfqw-4q25, MINI-q24x-7j63-4qcw, MINI-q8fq-wccm-hrqh, MINI-qc3h-mvxj-gcq8, MINI-qch7-9wcr-39xw, MINI-qcr5-rr98-jxjg, MINI-qjj4-rwfv-jhhm, MINI-qjq4-62w5-67vp, MINI-qm2m-94c7-fxh3, MINI-qx3q-6gmp-49h4, MINI-qx6h-84q7-8q9v, MINI-r2g9-cpmh-fw8x, MINI-r3v9-888h-868j, MINI-r5h2-fxw8-p56r, MINI-r65m-pq76-fwm8, MINI-r6wc-fhvv-4359, MINI-r7xw-4hxv-f55v, MINI-r9gc-5xjv-qfvv, MINI-rc2x-2wp2-8cwh, MINI-rffp-wp2g-wwpp, MINI-rfh6-vr9j-qpmc, MINI-rhf7-pgmq-h8m2, MINI-rhmq-6mhr-rgh6, MINI-rhr7-28xf-9f9q, MINI-rqm3-c84v-932m, MINI-rr87-xcrx-gm2x, MINI-rx89-3fr3-554v, MINI-rxfm-w968-5vc6, MINI-v35r-jxxx-c9xj, MINI-v63g-46qr-6ppp, MINI-v6jf-wggv-954p, MINI-v6q4-xmwv-68g7, MINI-v6q9-g9xp-m4j2, MINI-vjh5-p9hj-fcqh, MINI-w376-m58p-r3mx, MINI-w4qr-hqwc-43f5, MINI-w67h-8xvr-4qh3, MINI-w78w-367p-4mf3, MINI-w8fx-g2x9-cmwg, MINI-wg4r-j34j-3mfh, MINI-wxcx-h5pq-fh99, MINI-x25w-7hh8-2m7r, MINI-x277-2rj6-mfw5, MINI-x5x3-w98h-fj97, MINI-x868-7ggm-6v54, MINI-x8v5-78jf-v7r5, MINI-xgr4-fp83-crvc, MINI-xh47-hw8g-6w86, UBUNTU-CVE-2026-50162

## What is CVE-2026-50162?

CVE-2026-50162 is a medium-severity path traversal vulnerability in oras-project oras-go, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

oras-go is a Go library for managing OCI artifacts. Prior to 2.6.1, resolveWritePath() in content/file/file.go uses a lexical filepath.Rel check for workingDir and does not account for symlink traversal, so when AllowPathTraversalOnWrite=false an attacker-controlled blob title through ocispec.AnnotationTitle such as out/pwn.txt can follow a workingDir symlink out -> /some/outside/dir and cause pushFile() to create /some/outside/dir/pwn.txt outside workingDir. This issue is fixed in version 2.6.1.

Weakness: CWE-73 (External Control of File Name or Path)

## Which versions are affected by CVE-2026-50162?

3 open source packages ship an affected version, including oras.land/oras-go/v2.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `oras.land/oras-go/v2` | Go | All versions | 2.6.1 |
| `oras.land/oras-go/v2` | Go | All versions | 2.6.1 |
| `oras.land/oras-go/v2` | Go | All versions | 2.6.1 |

## How do I fix CVE-2026-50162?

Upgrade oras.land/oras-go/v2 to 2.6.1 or later.

## Is CVE-2026-50162 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50162 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-50162 and fix it if it is affected.

What it is: CVE-2026-50162 is a medium-severity path traversal vulnerability in oras-project oras-go, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50162 exists.

Affected packages and fixed versions:
- oras.land/oras-go/v2 (Go): affected all versions; fixed in 2.6.1
- oras.land/oras-go/v2 (Go): affected all versions; fixed in 2.6.1
- oras.land/oras-go/v2 (Go): affected all versions; fixed in 2.6.1

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-2026-50162/ (Markdown: https://insights.sbomify.com/CVE-2026-50162/index.md)
```

## Sources

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

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